

<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
  <meta charset="utf-8" />
  <meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  
  <title>Voice Lab Interface &mdash; VoiceLab: Automated Reproducible Acoustic Analysis</title>
  

  
  <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />

  
  

  
  

  

  
  <!--[if lt IE 9]>
    <script src="_static/js/html5shiv.min.js"></script>
  <![endif]-->
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
        <script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
        <script src="_static/doctools.js"></script>
        <script src="_static/sphinx_highlight.js"></script>
        <script async="async" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
    
    <script type="text/javascript" src="_static/js/theme.js"></script>

    
    <link rel="search" title="Search" href="search.html" /> 
</head>

<body class="wy-body-for-nav">

   
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search" >
          

          
            <a href="#" class="icon icon-home"> VoiceLab
          

          
          </a>

          
            
            
              <div class="version">
                2.2.0
              </div>
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        
        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <!-- Local TOC -->
              <div class="local-toc"><ul>
<li><a class="reference internal" href="#">Voice Lab Interface</a><ul>
<li><a class="reference internal" href="#load-voices-tab">Load Voices Tab</a><ul>
<li><a class="reference internal" href="#load-sound-file">Load Sound File</a></li>
<li><a class="reference internal" href="#remove-sound-file">Remove Sound File</a></li>
<li><a class="reference internal" href="#start">Start</a></li>
</ul>
</li>
<li><a class="reference internal" href="#settings-tab">Settings Tab</a><ul>
<li><a class="reference internal" href="#save-results">Save Results</a><ul>
<li><a class="reference internal" href="#results-xlsx">results.xlsx</a></li>
<li><a class="reference internal" href="#settings-xlsx">settings.xlsx</a></li>
</ul>
</li>
<li><a class="reference internal" href="#results-tab">Results Tab</a><ul>
<li><a class="reference internal" href="#output-formats">Output formats</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#documentation-and-api-reference">Documentation and API Reference</a><ul>
<li><a class="reference internal" href="#automated-settings">Automated Settings</a><ul>
<li><a class="reference internal" href="#automated-pitch-floor-and-ceiling-parameters">Automated pitch floor and ceiling parameters</a></li>
</ul>
</li>
<li><a class="reference internal" href="#measurement-nodes">Measurement Nodes</a><ul>
<li><a class="reference internal" href="#measure-pitch">Measure Pitch</a><ul>
<li><a class="reference internal" href="#measure-pitch-yin">Measure Pitch Yin</a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasurePitchNode.MeasurePitchNode"><code class="docutils literal notranslate"><span class="pre">MeasurePitchNode</span></code></a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasurePitchNode.MeasurePitchNode.process"><code class="docutils literal notranslate"><span class="pre">MeasurePitchNode.process()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasurePitchNode.measure_pitch_praat"><code class="docutils literal notranslate"><span class="pre">measure_pitch_praat()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#measure-subharmonics">Measure Subharmonics</a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureSHRPNode.MeasureSHRPNode"><code class="docutils literal notranslate"><span class="pre">MeasureSHRPNode</span></code></a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureSHRPNode.MeasureSHRPNode.process"><code class="docutils literal notranslate"><span class="pre">MeasureSHRPNode.process()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureSHRPNode.compute_shr"><code class="docutils literal notranslate"><span class="pre">compute_shr()</span></code></a></li>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureSHRPNode.ethreshold"><code class="docutils literal notranslate"><span class="pre">ethreshold()</span></code></a></li>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureSHRPNode.round_half_away_from_zero"><code class="docutils literal notranslate"><span class="pre">round_half_away_from_zero()</span></code></a></li>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureSHRPNode.shr_pitch"><code class="docutils literal notranslate"><span class="pre">shr_pitch()</span></code></a></li>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureSHRPNode.shrp"><code class="docutils literal notranslate"><span class="pre">shrp()</span></code></a></li>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureSHRPNode.two_max"><code class="docutils literal notranslate"><span class="pre">two_max()</span></code></a></li>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureSHRPNode.wavread"><code class="docutils literal notranslate"><span class="pre">wavread()</span></code></a></li>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureSHRPNode.window"><code class="docutils literal notranslate"><span class="pre">window()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#measure-cpp-cepstral-peak-prominence">Measure CPP (Cepstral Peak Prominence)</a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureCPPNode.MeasureCPPNode"><code class="docutils literal notranslate"><span class="pre">MeasureCPPNode</span></code></a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureCPPNode.MeasureCPPNode.process"><code class="docutils literal notranslate"><span class="pre">MeasureCPPNode.process()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#measure-duration">Measure Duration</a></li>
<li><a class="reference internal" href="#measure-energy">Measure Energy</a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureEnergyNode.MeasureEnergyNode"><code class="docutils literal notranslate"><span class="pre">MeasureEnergyNode</span></code></a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureEnergyNode.MeasureEnergyNode.get_energy_voice_sauce"><code class="docutils literal notranslate"><span class="pre">MeasureEnergyNode.get_energy_voice_sauce()</span></code></a></li>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureEnergyNode.MeasureEnergyNode.get_times_and_pitches"><code class="docutils literal notranslate"><span class="pre">MeasureEnergyNode.get_times_and_pitches()</span></code></a></li>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureEnergyNode.MeasureEnergyNode.process"><code class="docutils literal notranslate"><span class="pre">MeasureEnergyNode.process()</span></code></a></li>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureEnergyNode.MeasureEnergyNode.refine_pitch_voice_sauce"><code class="docutils literal notranslate"><span class="pre">MeasureEnergyNode.refine_pitch_voice_sauce()</span></code></a></li>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureEnergyNode.MeasureEnergyNode.round_half_away_from_zero"><code class="docutils literal notranslate"><span class="pre">MeasureEnergyNode.round_half_away_from_zero()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#measure-formants">Measure Formants</a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureFormantNode.MeasureFormantNode"><code class="docutils literal notranslate"><span class="pre">MeasureFormantNode</span></code></a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureFormantNode.MeasureFormantNode.end"><code class="docutils literal notranslate"><span class="pre">MeasureFormantNode.end()</span></code></a></li>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureFormantNode.MeasureFormantNode.measure_formants_burg"><code class="docutils literal notranslate"><span class="pre">MeasureFormantNode.measure_formants_burg()</span></code></a></li>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureFormantNode.MeasureFormantNode.process"><code class="docutils literal notranslate"><span class="pre">MeasureFormantNode.process()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureFormantNode.get_values_function"><code class="docutils literal notranslate"><span class="pre">get_values_function()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#measure-vocal-tract-length-estimates">Measure Vocal Tract Length Estimates</a><ul>
<li><a class="reference internal" href="#average-formant">Average Formant</a></li>
<li><a class="reference internal" href="#principle-components-analysis">Principle Components Analysis</a></li>
<li><a class="reference internal" href="#geometric-mean">Geometric Mean</a></li>
<li><a class="reference internal" href="#formant-dispersion">Formant Dispersion</a></li>
<li><a class="reference internal" href="#vtl">VTL</a></li>
<li><a class="reference internal" href="#vtl-f">VTL Δf</a></li>
<li><a class="reference internal" href="#measure-formant-positions-node">Measure Formant Positions Node</a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureVocalTractEstimatesNode.MeasureVocalTractEstimatesNode"><code class="docutils literal notranslate"><span class="pre">MeasureVocalTractEstimatesNode</span></code></a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureVocalTractEstimatesNode.MeasureVocalTractEstimatesNode.end"><code class="docutils literal notranslate"><span class="pre">MeasureVocalTractEstimatesNode.end()</span></code></a></li>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureVocalTractEstimatesNode.MeasureVocalTractEstimatesNode.get_average_formant"><code class="docutils literal notranslate"><span class="pre">MeasureVocalTractEstimatesNode.get_average_formant()</span></code></a></li>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureVocalTractEstimatesNode.MeasureVocalTractEstimatesNode.get_delta_f"><code class="docutils literal notranslate"><span class="pre">MeasureVocalTractEstimatesNode.get_delta_f()</span></code></a></li>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureVocalTractEstimatesNode.MeasureVocalTractEstimatesNode.get_fitch_vtl"><code class="docutils literal notranslate"><span class="pre">MeasureVocalTractEstimatesNode.get_fitch_vtl()</span></code></a></li>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureVocalTractEstimatesNode.MeasureVocalTractEstimatesNode.get_formant_dispersion"><code class="docutils literal notranslate"><span class="pre">MeasureVocalTractEstimatesNode.get_formant_dispersion()</span></code></a></li>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureVocalTractEstimatesNode.MeasureVocalTractEstimatesNode.get_formants_pca"><code class="docutils literal notranslate"><span class="pre">MeasureVocalTractEstimatesNode.get_formants_pca()</span></code></a></li>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureVocalTractEstimatesNode.MeasureVocalTractEstimatesNode.get_geometric_mean"><code class="docutils literal notranslate"><span class="pre">MeasureVocalTractEstimatesNode.get_geometric_mean()</span></code></a></li>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureVocalTractEstimatesNode.MeasureVocalTractEstimatesNode.get_vtl_delta_f"><code class="docutils literal notranslate"><span class="pre">MeasureVocalTractEstimatesNode.get_vtl_delta_f()</span></code></a></li>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureVocalTractEstimatesNode.MeasureVocalTractEstimatesNode.process"><code class="docutils literal notranslate"><span class="pre">MeasureVocalTractEstimatesNode.process()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureFormantPositionsNode.MeasureFormantPositionsNode"><code class="docutils literal notranslate"><span class="pre">MeasureFormantPositionsNode</span></code></a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureFormantPositionsNode.MeasureFormantPositionsNode.calculate_formant_position"><code class="docutils literal notranslate"><span class="pre">MeasureFormantPositionsNode.calculate_formant_position()</span></code></a></li>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureFormantPositionsNode.MeasureFormantPositionsNode.end"><code class="docutils literal notranslate"><span class="pre">MeasureFormantPositionsNode.end()</span></code></a></li>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureFormantPositionsNode.MeasureFormantPositionsNode.process"><code class="docutils literal notranslate"><span class="pre">MeasureFormantPositionsNode.process()</span></code></a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#measure-harmonicity">Measure Harmonicity</a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureHarmonicityNode.MeasureHarmonicityNode"><code class="docutils literal notranslate"><span class="pre">MeasureHarmonicityNode</span></code></a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureHarmonicityNode.MeasureHarmonicityNode.process"><code class="docutils literal notranslate"><span class="pre">MeasureHarmonicityNode.process()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#measure-intensity">Measure Intensity</a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureIntensityNode.MeasureIntensityNode"><code class="docutils literal notranslate"><span class="pre">MeasureIntensityNode</span></code></a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureIntensityNode.MeasureIntensityNode.process"><code class="docutils literal notranslate"><span class="pre">MeasureIntensityNode.process()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#measure-jitter">Measure Jitter</a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureJitterNode.MeasureJitterNode"><code class="docutils literal notranslate"><span class="pre">MeasureJitterNode</span></code></a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureJitterNode.MeasureJitterNode.end"><code class="docutils literal notranslate"><span class="pre">MeasureJitterNode.end()</span></code></a></li>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureJitterNode.MeasureJitterNode.jitter_pca"><code class="docutils literal notranslate"><span class="pre">MeasureJitterNode.jitter_pca()</span></code></a></li>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureJitterNode.MeasureJitterNode.process"><code class="docutils literal notranslate"><span class="pre">MeasureJitterNode.process()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#measure-shimmer">Measure Shimmer</a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureShimmerNode.MeasureShimmerNode"><code class="docutils literal notranslate"><span class="pre">MeasureShimmerNode</span></code></a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureShimmerNode.MeasureShimmerNode.end"><code class="docutils literal notranslate"><span class="pre">MeasureShimmerNode.end()</span></code></a></li>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureShimmerNode.MeasureShimmerNode.process"><code class="docutils literal notranslate"><span class="pre">MeasureShimmerNode.process()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#measure-ltas">Measure LTAS</a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureLTASNode.MeasureLTASNode"><code class="docutils literal notranslate"><span class="pre">MeasureLTASNode</span></code></a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureLTASNode.MeasureLTASNode.process"><code class="docutils literal notranslate"><span class="pre">MeasureLTASNode.process()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#measure-mfcc">Measure MFCC</a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureMFCCNode.MeasureMFCCNode"><code class="docutils literal notranslate"><span class="pre">MeasureMFCCNode</span></code></a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureMFCCNode.MeasureMFCCNode.process"><code class="docutils literal notranslate"><span class="pre">MeasureMFCCNode.process()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#measure-spectral-shape">Measure Spectral Shape</a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureSpectralShapeNode.MeasureSpectralShapeNode"><code class="docutils literal notranslate"><span class="pre">MeasureSpectralShapeNode</span></code></a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureSpectralShapeNode.MeasureSpectralShapeNode.process"><code class="docutils literal notranslate"><span class="pre">MeasureSpectralShapeNode.process()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#measure-spectral-tilt">Measure Spectral Tilt</a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureSpectralTiltNode.MeasureSpectralTiltNode"><code class="docutils literal notranslate"><span class="pre">MeasureSpectralTiltNode</span></code></a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureSpectralTiltNode.MeasureSpectralTiltNode.process"><code class="docutils literal notranslate"><span class="pre">MeasureSpectralTiltNode.process()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#measure-speech-rate">Measure Speech Rate</a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureSpeechRateNode.MeasureSpeechRateNode"><code class="docutils literal notranslate"><span class="pre">MeasureSpeechRateNode</span></code></a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureSpeechRateNode.MeasureSpeechRateNode.process"><code class="docutils literal notranslate"><span class="pre">MeasureSpeechRateNode.process()</span></code></a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#manipulation-nodes">Manipulation Nodes</a><ul>
<li><a class="reference internal" href="#lower-pitch">Lower Pitch</a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.ManipulatePitchLowerNode.ManipulatePitchLowerNode"><code class="docutils literal notranslate"><span class="pre">ManipulatePitchLowerNode</span></code></a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.ManipulatePitchLowerNode.ManipulatePitchLowerNode.args"><code class="docutils literal notranslate"><span class="pre">ManipulatePitchLowerNode.args</span></code></a></li>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.ManipulatePitchLowerNode.ManipulatePitchLowerNode.process"><code class="docutils literal notranslate"><span class="pre">ManipulatePitchLowerNode.process()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#raise-pitch">Raise Pitch</a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.ManipulatePitchHigherNode.ManipulatePitchHigherNode"><code class="docutils literal notranslate"><span class="pre">ManipulatePitchHigherNode</span></code></a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.ManipulatePitchHigherNode.ManipulatePitchHigherNode.args"><code class="docutils literal notranslate"><span class="pre">ManipulatePitchHigherNode.args</span></code></a></li>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.ManipulatePitchHigherNode.ManipulatePitchHigherNode.process"><code class="docutils literal notranslate"><span class="pre">ManipulatePitchHigherNode.process()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#lower-formants">Lower Formants</a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.ManipulateLowerFormantsNode.ManipulateLowerFormantsNode"><code class="docutils literal notranslate"><span class="pre">ManipulateLowerFormantsNode</span></code></a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.ManipulateLowerFormantsNode.ManipulateLowerFormantsNode.process"><code class="docutils literal notranslate"><span class="pre">ManipulateLowerFormantsNode.process()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#raise-formants">Raise Formants</a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.ManipulateRaiseFormantsNode.ManipulateRaiseFormantsNode"><code class="docutils literal notranslate"><span class="pre">ManipulateRaiseFormantsNode</span></code></a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.ManipulateRaiseFormantsNode.ManipulateRaiseFormantsNode.process"><code class="docutils literal notranslate"><span class="pre">ManipulateRaiseFormantsNode.process()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#lower-pitch-and-formants">Lower Pitch and Formants</a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.ManipulateLowerPitchAndFormantsNode.ManipulateLowerPitchAndFormantsNode"><code class="docutils literal notranslate"><span class="pre">ManipulateLowerPitchAndFormantsNode</span></code></a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.ManipulateLowerPitchAndFormantsNode.ManipulateLowerPitchAndFormantsNode.process"><code class="docutils literal notranslate"><span class="pre">ManipulateLowerPitchAndFormantsNode.process()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#raise-pitch-and-formants">Raise Pitch and Formants</a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.ManipulateRaisePitchAndFormantsNode.ManipulateRaisePitchAndFormantsNode"><code class="docutils literal notranslate"><span class="pre">ManipulateRaisePitchAndFormantsNode</span></code></a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.ManipulateRaisePitchAndFormantsNode.ManipulateRaisePitchAndFormantsNode.process"><code class="docutils literal notranslate"><span class="pre">ManipulateRaisePitchAndFormantsNode.process()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#reverse-sounds">Reverse Sounds</a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.ReverseSoundsNode.ReverseSoundsNode"><code class="docutils literal notranslate"><span class="pre">ReverseSoundsNode</span></code></a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.ReverseSoundsNode.ReverseSoundsNode.process"><code class="docutils literal notranslate"><span class="pre">ReverseSoundsNode.process()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#resample-sounds">Resample Sounds</a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.ResampleSoundsNode.ResampleSoundsNode"><code class="docutils literal notranslate"><span class="pre">ResampleSoundsNode</span></code></a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.ResampleSoundsNode.ResampleSoundsNode.process"><code class="docutils literal notranslate"><span class="pre">ResampleSoundsNode.process()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#rotate-spectrum">Rotate Spectrum</a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.RotateSpectrumNode.RotateSpectrumNode"><code class="docutils literal notranslate"><span class="pre">RotateSpectrumNode</span></code></a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.RotateSpectrumNode.RotateSpectrumNode.process"><code class="docutils literal notranslate"><span class="pre">RotateSpectrumNode.process()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#scale-intensity">Scale Intensity</a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.ScaleIntensityNode.ScaleIntensityNode"><code class="docutils literal notranslate"><span class="pre">ScaleIntensityNode</span></code></a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.ScaleIntensityNode.ScaleIntensityNode.process"><code class="docutils literal notranslate"><span class="pre">ScaleIntensityNode.process()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#truncate-sounds">Truncate Sounds</a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.ManipulateTruncateSoundsNode.ManipulateTruncateSoundsNode"><code class="docutils literal notranslate"><span class="pre">ManipulateTruncateSoundsNode</span></code></a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.ManipulateTruncateSoundsNode.ManipulateTruncateSoundsNode.get_output_file_name"><code class="docutils literal notranslate"><span class="pre">ManipulateTruncateSoundsNode.get_output_file_name()</span></code></a></li>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.ManipulateTruncateSoundsNode.ManipulateTruncateSoundsNode.process"><code class="docutils literal notranslate"><span class="pre">ManipulateTruncateSoundsNode.process()</span></code></a></li>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.ManipulateTruncateSoundsNode.ManipulateTruncateSoundsNode.trim_silences"><code class="docutils literal notranslate"><span class="pre">ManipulateTruncateSoundsNode.trim_silences()</span></code></a></li>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.ManipulateTruncateSoundsNode.ManipulateTruncateSoundsNode.trim_sound"><code class="docutils literal notranslate"><span class="pre">ManipulateTruncateSoundsNode.trim_sound()</span></code></a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#visualization-nodes">Visualization Nodes</a><ul>
<li><a class="reference internal" href="#spectrograms">Spectrograms</a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.VisualizeVoiceNode.VisualizeVoiceNode"><code class="docutils literal notranslate"><span class="pre">VisualizeVoiceNode</span></code></a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.VisualizeVoiceNode.VisualizeVoiceNode.plot_formants"><code class="docutils literal notranslate"><span class="pre">VisualizeVoiceNode.plot_formants()</span></code></a></li>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.VisualizeVoiceNode.VisualizeVoiceNode.plot_intensity"><code class="docutils literal notranslate"><span class="pre">VisualizeVoiceNode.plot_intensity()</span></code></a></li>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.VisualizeVoiceNode.VisualizeVoiceNode.plot_pitch"><code class="docutils literal notranslate"><span class="pre">VisualizeVoiceNode.plot_pitch()</span></code></a></li>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.VisualizeVoiceNode.VisualizeVoiceNode.process"><code class="docutils literal notranslate"><span class="pre">VisualizeVoiceNode.process()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#power-spectra">Power Spectra</a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.VisualizeSpectrumNode.VisualizeSpectrumNode"><code class="docutils literal notranslate"><span class="pre">VisualizeSpectrumNode</span></code></a><ul>
<li><a class="reference internal" href="#voicelab.src.Voicelab.toolkits.Voicelab.VisualizeSpectrumNode.VisualizeSpectrumNode.process"><code class="docutils literal notranslate"><span class="pre">VisualizeSpectrumNode.process()</span></code></a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
            
          
        </div>
        
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="#">VoiceLab</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          

















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="#" class="icon icon-home"></a> &raquo;</li>
        
      <li>Voice Lab Interface</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
          
        
      </li>
    
  </ul>

  
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <section id="voice-lab-interface">
<h1>Voice Lab Interface<a class="headerlink" href="#voice-lab-interface" title="Permalink to this heading">¶</a></h1>
<p>Voice Lab is an automated voice analysis software. What this software does is allow you to measure, manipulate, and visualize many voices at once, without messing with analysis parameters. You can also save all of your data, analysis parameters, manipulated voices, and full colour spectrograms with the press of one button.</p>
<p>Voice Lab is written in Python and relies heavily on a package called parselmouth-praat. parselmouth-praat is a Python package that essentially turns Praat’s source code written in C and C++ into a Pythonic interface. What that means is that any praat measurement in this software is using actual Praat source code, so you can trust the underlying algorithms. Voice Lab figures out all of the analysis parameters for you, but you can always use your own, and these are the same parameters as in Praat, and they do the exact same thing because it is Praat’s source code powering everything. That means if you are a beginner an expert, or anything in-between, you can use this software to automate your acoustical analyses.</p>
<p>All of the code is open source and available on our GitHub repository, so if this manual isn’t in-depth enough, and you want to see exactly what’s going on, go for it. It is under the MIT license, so you are free to do what you like with the software as long as you give us credit. For more info on that license, see here.</p>
<section id="load-voices-tab">
<h2>Load Voices Tab<a class="headerlink" href="#load-voices-tab" title="Permalink to this heading">¶</a></h2>
<a class="reference internal image-reference" href="../_static/LoadVoices.png"><img alt="Load voices window" src="../_static/LoadVoices.png" style="width: 400px;" /></a>
<section id="load-sound-file">
<h3>Load Sound File<a class="headerlink" href="#load-sound-file" title="Permalink to this heading">¶</a></h3>
<p>Press this button to load sound files. You can load as many files as you like.
At the moment, Voice Lab processes the following file types:</p>
<ul class="simple">
<li><p>wav</p></li>
<li><p>mp3</p></li>
<li><p>aiff</p></li>
<li><p>ogg</p></li>
<li><p>aifc</p></li>
<li><p>au</p></li>
<li><p>nist</p></li>
<li><p>flac</p></li>
</ul>
</section>
<section id="remove-sound-file">
<h3>Remove Sound File<a class="headerlink" href="#remove-sound-file" title="Permalink to this heading">¶</a></h3>
<p>Use this button to remove the selected sound file(s) from the list.</p>
</section>
<section id="start">
<h3>Start<a class="headerlink" href="#start" title="Permalink to this heading">¶</a></h3>
<p>Pressing this begins analysis. If you want to run the default analysis, press this button.
If you want to select different analyses or adjust analysis parameters, go to the ‘Settings’ tab and press the ‘Advanced Settings’ button.
Only the files selected (in blue) will be analyzed. By default we will select all files.</p>
</section>
</section>
<section id="settings-tab">
<span id="settings"></span><h2>Settings Tab<a class="headerlink" href="#settings-tab" title="Permalink to this heading">¶</a></h2>
<a class="reference internal image-reference" href="../settings.png"><img alt="Settings window" src="../settings.png" style="width: 400px;" /></a>
<p>To choose different analyses, select the <code class="code highlight python docutils literal highlight-python"><span class="n">Use</span> <span class="n">Advanced</span> <span class="n">Settings</span></code> checkbox. From here, you’ll be given the option to select different analyses. You can also change any analysis parameters. If you do change analysis parameters, make sure you know what you are doing, and remember that those same analysis parameters will be used on all voice files that are selected. If you don’t alter these parameters, we determine analysis parameters automatically for you, so they are tailored for each voice to give the best measurements.</p>
<section id="save-results">
<h3>Save Results<a class="headerlink" href="#save-results" title="Permalink to this heading">¶</a></h3>
<p>Save Results saves two xlsx files. One is the results.xlsx file and one is the settings.xlsx file. Here you can choose the directory you want to save the files into. You don’t have to click on a file, just go to the directory and press the button.</p>
<section id="results-xlsx">
<h4>results.xlsx<a class="headerlink" href="#results-xlsx" title="Permalink to this heading">¶</a></h4>
<p>The results file saves all of the voice measurements that you made. Each measurement gets a separate tab in the xlsx file.</p>
</section>
<section id="settings-xlsx">
<h4>settings.xlsx<a class="headerlink" href="#settings-xlsx" title="Permalink to this heading">¶</a></h4>
<p>This file saves all of the parameters used in each measurement. Each measurement gets a separate tab in the xlsx file. This is great if you want to know what happened. It can also accompany a manuscript or paper to help others replicate analyses.</p>
</section>
</section>
<section id="results-tab">
<h3>Results Tab<a class="headerlink" href="#results-tab" title="Permalink to this heading">¶</a></h3>
<a class="reference internal image-reference" href="../output_window.png"><img alt="Results window" src="../output_window.png" style="width: 400px;" /></a>
<p>This is where you can view results. You can select each voice file on the left and view each measurement result on the bottom frame. You can also view your spectrograms in the spectrogram window. You can change the size of any of these frames in order to see things better. Press <code class="code highlight python docutils literal highlight-python"><span class="n">Save</span> <span class="n">Results</span></code> to save data. All data (results &amp; settings), manipulated voices, and spectrograms are saved automatically when this button is pressed. All you have to do is choose which folder to save into. Don’t worry about picking file names, Voice Lab will make those automatically for you.</p>
<section id="output-formats">
<h4>Output formats<a class="headerlink" href="#output-formats" title="Permalink to this heading">¶</a></h4>
<ul class="simple">
<li><p>All data files are saved as xlsx</p></li>
<li><p>All sound files are saved as wav</p></li>
<li><p>All image files are saved as png</p></li>
</ul>
</section>
</section>
</section>
</section>
<section id="documentation-and-api-reference">
<h1>Documentation and API Reference<a class="headerlink" href="#documentation-and-api-reference" title="Permalink to this heading">¶</a></h1>
<p>THe API is not a supported way to run Voicelab, but it works, with some elbow grease.
You need to clone the github repo and run it from the command line, but not if you install it from PyPi or Binary. You
can adapt this process for any node.  See source code for the node you want to run for more details. I have the
directory structure set up below in the code examples. It’s just at test file, but you can see how to make it work.
In short, The prepare_node() function sets up the node with the sound file the way it likes it and returns the node. The
process() method runs the node.</p>
<p id="codeexample">Running Voicelab from the command line was never intended, but you can hack your way through.
This is a code example from the tests. It shows how to run Voicelab from the command line.
This is not a supported way to run Voicelab, but it works.
This will work if you clone the github repo and run it from the command line, but not if you install it from
PyPi or Binary.
You can adapt this for any node.  See source code for the node you want to run for more details.
I have the directory structure set up below.  You might need to fiddle with it.
The <cite>prepare_node()</cite> function sets up the node with the sound file the way it likes it and returns the node.
The <cite>process()</cite> method runs the node.</p>
<div class="highlight-Python notranslate"><div class="highlight"><pre><span></span><span class="c1"># Arrange</span>
<span class="k">def</span> <span class="nf">get_test_files</span><span class="p">():</span>
  <span class="n">number_of_test_files</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">listdir</span><span class="p">(</span><span class="n">AUDIO_DIR</span><span class="p">))</span> <span class="o">-</span> <span class="mi">1</span>  <span class="c1"># -1 because the first file is a broken sound</span>
  <span class="n">test_files</span> <span class="o">=</span> <span class="nb">sorted</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">listdir</span><span class="p">(</span><span class="n">AUDIO_DIR</span><span class="p">))[</span><span class="mi">1</span><span class="p">:]</span>
  <span class="k">return</span> <span class="n">number_of_test_files</span><span class="p">,</span> <span class="n">test_files</span>
</pre></div>
</div>
<div class="highlight-Python notranslate"><div class="highlight"><pre><span></span><span class="c1"># Arrange</span>
<span class="k">def</span> <span class="nf">prepare_node</span><span class="p">(</span><span class="n">test_file</span><span class="p">):</span>
  <span class="n">file_path</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">AUDIO_DIR</span><span class="p">,</span> <span class="n">test_file</span><span class="p">)</span>
  <span class="n">node</span> <span class="o">=</span> <span class="n">ReverseSoundsNode</span><span class="o">.</span><span class="n">ReverseSoundsNode</span><span class="p">()</span>
  <span class="n">node</span><span class="o">.</span><span class="n">args</span><span class="p">[</span><span class="s1">&#39;file_path&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">file_path</span>
  <span class="c1"># Load the sound and setup the node</span>
  <span class="k">try</span><span class="p">:</span>
      <span class="n">sound</span><span class="p">:</span> <span class="n">parselmouth</span><span class="o">.</span><span class="n">Sound</span> <span class="o">=</span> <span class="n">parselmouth</span><span class="o">.</span><span class="n">Sound</span><span class="p">(</span><span class="n">file_path</span><span class="p">)</span>
      <span class="n">signal</span> <span class="o">=</span> <span class="n">sound</span><span class="o">.</span><span class="n">values</span>
      <span class="n">sampling_rate</span> <span class="o">=</span> <span class="n">sound</span><span class="o">.</span><span class="n">sampling_frequency</span>
  <span class="k">except</span><span class="p">:</span>
      <span class="n">signal</span> <span class="o">=</span> <span class="kc">None</span>
      <span class="n">sampling_rate</span> <span class="o">=</span> <span class="kc">None</span>
  <span class="n">node</span><span class="o">.</span><span class="n">voice</span> <span class="o">=</span> <span class="p">(</span><span class="n">signal</span><span class="p">,</span> <span class="n">sampling_rate</span><span class="p">)</span>
  <span class="n">node</span><span class="o">.</span><span class="n">args</span><span class="p">[</span><span class="s1">&#39;voice&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="p">(</span><span class="n">signal</span><span class="p">,</span> <span class="n">sampling_rate</span><span class="p">)</span>
  <span class="nb">print</span><span class="p">((</span><span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">file_path</span><span class="si">=}</span><span class="s2">..</span><span class="si">{</span><span class="n">sampling_rate</span><span class="si">=}</span><span class="s2">&quot;</span><span class="p">))</span>
  <span class="k">return</span> <span class="n">node</span>
</pre></div>
</div>
<div class="highlight-Python notranslate"><div class="highlight"><pre><span></span><span class="c1"># Arrange</span>
<span class="k">def</span> <span class="nf">get_reversed_test_sound</span><span class="p">(</span><span class="n">test_file</span><span class="p">):</span>
  <span class="n">file_path</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">AUDIO_DIR</span><span class="p">,</span> <span class="n">test_file</span><span class="p">)</span>
  <span class="n">validation_sound</span> <span class="o">=</span> <span class="n">parselmouth</span><span class="o">.</span><span class="n">Sound</span><span class="p">(</span><span class="n">file_path</span><span class="p">)</span>
  <span class="n">validation_sound</span><span class="o">.</span><span class="n">reverse</span><span class="p">()</span>
  <span class="k">return</span> <span class="n">validation_sound</span><span class="o">.</span><span class="n">values</span>
</pre></div>
</div>
<div class="highlight-Python notranslate"><div class="highlight"><pre><span></span><span class="c1"># Arrange</span>
<span class="k">def</span> <span class="nf">get_number_of_test_files</span><span class="p">():</span>
  <span class="n">number_of_test_files</span><span class="p">,</span> <span class="n">_</span> <span class="o">=</span> <span class="n">get_test_files</span><span class="p">()</span>
  <span class="k">return</span> <span class="n">number_of_test_files</span>
</pre></div>
</div>
<div class="highlight-Python notranslate"><div class="highlight"><pre><span></span><span class="c1"># Arrange</span>
<span class="k">def</span> <span class="nf">generate_numpy_arrays</span><span class="p">(</span><span class="n">execution_number</span><span class="p">):</span>
  <span class="n">number_of_test_files</span><span class="p">,</span> <span class="n">test_files</span> <span class="o">=</span> <span class="n">get_test_files</span><span class="p">()</span>
  <span class="n">filename</span> <span class="o">=</span> <span class="n">test_files</span><span class="p">[</span><span class="n">execution_number</span><span class="p">]</span>
  <span class="n">node</span> <span class="o">=</span> <span class="n">prepare_node</span><span class="p">(</span><span class="n">filename</span><span class="p">)</span>
  <span class="c1"># Run the node</span>
  <span class="n">results</span> <span class="o">=</span> <span class="n">node</span><span class="o">.</span><span class="n">process</span><span class="p">()</span>
  <span class="nb">print</span><span class="p">(</span><span class="n">results</span><span class="p">)</span>
  <span class="c1"># Validate the results</span>
  <span class="n">validation_sound</span> <span class="o">=</span> <span class="n">get_reversed_test_sound</span><span class="p">(</span><span class="n">filename</span><span class="p">)</span>
  <span class="n">test_sound</span> <span class="o">=</span> <span class="n">results</span><span class="p">[</span><span class="s1">&#39;voice&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">values</span>
  <span class="k">return</span> <span class="n">test_sound</span><span class="p">,</span> <span class="n">validation_sound</span>

<span class="c1"># Act</span>
<span class="nd">@pytest</span><span class="o">.</span><span class="n">mark</span><span class="o">.</span><span class="n">parametrize</span><span class="p">(</span><span class="s1">&#39;execution_number&#39;</span><span class="p">,</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">listdir</span><span class="p">(</span><span class="n">AUDIO_DIR</span><span class="p">))</span> <span class="o">-</span> <span class="mi">1</span><span class="p">))</span>
<span class="k">def</span> <span class="nf">test_ReverseSoundsNode</span><span class="p">(</span><span class="n">execution_number</span><span class="p">):</span>
  <span class="n">test_sound</span><span class="p">,</span> <span class="n">validation_sound</span> <span class="o">=</span> <span class="n">generate_numpy_arrays</span><span class="p">(</span><span class="n">execution_number</span><span class="p">)</span>
  <span class="k">assert</span> <span class="n">np</span><span class="o">.</span><span class="n">array_equal</span><span class="p">(</span><span class="n">test_sound</span><span class="p">,</span> <span class="n">validation_sound</span><span class="p">)</span>
</pre></div>
</div>
<section id="automated-settings">
<h2>Automated Settings<a class="headerlink" href="#automated-settings" title="Permalink to this heading">¶</a></h2>
<p>VoiceLab uses automated settings for pitch floor and ceiling, and also uses these to set the centre frequency parameter in the FormantPath formant analysis.</p>
<section id="automated-pitch-floor-and-ceiling-parameters">
<span id="floor-ceiling"></span><h3>Automated pitch floor and ceiling parameters<a class="headerlink" href="#automated-pitch-floor-and-ceiling-parameters" title="Permalink to this heading">¶</a></h3>
<p>Praat suggests adjusting pitch settings based on <a class="reference external" href="http://www.fon.hum.uva.nl/praat/manual/Intro_4_2__Configuring_the_pitch_contour.html">gender</a> . It’s not gender per se that is important, but the pitch of voice. To mitigate this, VoiceLab first casts a wide net in  floor and ceiling settings to learn the range of probable fundamental frequencies is a voice. Then it remeasures the voice pitch using different settings for higher and lower pitched voices. VoiceLab by default uses employs <code class="code highlight python docutils literal highlight-python"><span class="n">very</span> <span class="n">accurate</span></code>. VoiceLab returns <code class="code highlight python docutils literal highlight-python"><span class="n">minimum</span> <span class="n">pitch</span></code>, <code class="code highlight python docutils literal highlight-python"><span class="n">maximum</span> <span class="n">pitch</span></code>, <code class="code highlight python docutils literal highlight-python"><span class="n">mean</span> <span class="n">pitch</span></code>, and <code class="code highlight python docutils literal highlight-python"><span class="n">standard</span> <span class="n">deviation</span> <span class="n">of</span> <span class="n">pitch</span></code>. By default VoiceLab uses  autocorrelation for <a class="reference internal" href="#pitch"><span class="std std-ref">Measuring Pitch</span></a>, and cross-correlation for <a class="reference internal" href="#hnr"><span class="std std-ref">harmonicity</span></a>, <a class="reference internal" href="#jitter"><span class="std std-ref">Jitter</span></a>, and <a class="reference internal" href="#shimmer"><span class="std std-ref">Shimmer</span></a>,</p>
</section>
</section>
<section id="measurement-nodes">
<h2>Measurement Nodes<a class="headerlink" href="#measurement-nodes" title="Permalink to this heading">¶</a></h2>
<section id="measure-pitch">
<span id="pitch"></span><h3>Measure Pitch<a class="headerlink" href="#measure-pitch" title="Permalink to this heading">¶</a></h3>
<dl class="simple">
<dt>This measures voice pitch or fundamental frequency. Users can measure pitch using any number of the following algorithms:</dt><dd><ul class="simple">
<li><p>Praat Autocorrelation</p></li>
<li><p>Praat Cross Correlation</p></li>
<li><p>Yin (From Librosa)</p></li>
<li><p>Subharmonics (from Open Sauce)</p></li>
</ul>
</dd>
</dl>
<p>By default it will measure all of these.</p>
<p>This uses Praat’s <code class="code highlight python docutils literal highlight-python"><span class="n">Sound</span><span class="p">:</span> <span class="n">To</span> <span class="n">Pitch</span> <span class="p">(</span><span class="n">ac</span><span class="p">)</span><span class="o">...</span></code>, by default. You can also use the cross-correlation algorithm: <code class="code highlight python docutils literal highlight-python"><span class="n">Sound</span><span class="p">:</span> <span class="n">To</span> <span class="n">Pitch</span> <span class="p">(</span><span class="n">cc</span><span class="p">)</span><span class="o">...</span></code>. For full details on these algorithms, see the <a class="reference external" href="http://www.fon.hum.uva.nl/praat/manual/Pitch.html">praat manual pitch page</a>.
<code class="code highlight python docutils literal highlight-python"><span class="n">Measure</span> <span class="n">Pitch</span></code> returns the following measurements:</p>
<blockquote>
<div><ul class="simple">
<li><p>A list of the pitch values</p></li>
<li><p>Minimum Pitch</p></li>
<li><p>Maximum Pitch</p></li>
<li><p>Mean Pitch</p></li>
<li><p>Standard Deviation of Pitch</p></li>
<li><p>Pitch Floor (used to set window length)</p></li>
<li><p>Pitch Ceiling (no candidates above this value will be considered)</p></li>
</ul>
</div></blockquote>
<p>We use the automated pitch floor and ceiling parameters described <a class="reference internal" href="#floor-ceiling"><span class="std std-ref">here.</span></a></p>
<section id="measure-pitch-yin">
<h4>Measure Pitch Yin<a class="headerlink" href="#measure-pitch-yin" title="Permalink to this heading">¶</a></h4>
<p>This is the Yin implementation from Librosa.  This is now run out of the Measure Pitch Node.</p>
<span class="target" id="module-voicelab.src.Voicelab.toolkits.Voicelab.MeasurePitchNode"></span><dl class="py class">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasurePitchNode.MeasurePitchNode">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">voicelab.src.Voicelab.toolkits.Voicelab.MeasurePitchNode.</span></span><span class="sig-name descname"><span class="pre">MeasurePitchNode</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasurePitchNode.MeasurePitchNode" title="Permalink to this definition">¶</a></dt>
<dd><section id="measure-pitch-with-praat">
<h5>Measure Pitch with Praat<a class="headerlink" href="#measure-pitch-with-praat" title="Permalink to this heading">¶</a></h5>
<blockquote>
<div><dl>
<dt>self.args: dict</dt><dd><p>Dictionary of arguments for the node.</p>
<dl class="simple">
<dt>self.args{‘Time Step’} (float):</dt><dd><p>Hop length in seconds. 0 is praat’s default, 0.75 / (pitch floor)</p>
</dd>
<dt>self.args{‘Max Number of Candidates’} (float)</dt><dd><p>The maximum number of pitch candidates to be considered</p>
</dd>
<dt>self.args{“Silence Threshold”} (float)</dt><dd><p>frames that do not contain amplitudes above this threshold (relative to the global maximum amplitude), are probably silent.</p>
</dd>
<dt>self.args{‘Voicing Threshold’} (float)</dt><dd><p>the strength of the unvoiced candidate, relative to the maximum possible autocorrelation. To increase the number of unvoiced decisions, increase this value.</p>
</dd>
<dt>self.args{‘Octave Cost’} (float)</dt><dd><p>degree of favouring of high-frequency candidates, relative to the maximum possible autocorrelation. This is necessary because even (or: especially) in the case of a perfectly periodic signal, all undertones of F0 are equally strong candidates as F0 itself. To more strongly favour recruitment of high-frequency candidates, increase this value.</p>
</dd>
<dt>self.args{“Octave Jump Cost”} (float)</dt><dd><p>degree of disfavouring of pitch changes, relative to the maximum possible autocorrelation. To decrease the number of large frequency jumps, increase this value. In contrast with what is described in the article, this value will be corrected for the time step: multiply by 0.01 s / TimeStep to get the value in the way it is used in the formulas in the article.</p>
</dd>
<dt>self.args{‘Vocied Unvoiced Cost’} (float)</dt><dd><p>degree of disfavouring of voiced/unvoiced transitions, relative to the maximum possible autocorrelation. To decrease the number of voiced/unvoiced transitions, increase this value. In contrast with what is described in the article, this value will be corrected for the time step: multiply by 0.01 s / TimeStep to get the value in the way it is used in the formulas in the article.</p>
</dd>
<dt>self.args{‘Unit’} (str)</dt><dd><p>The unit for pitch. Choices are “Hertz”,”Hertz (Logarithmic)”, “mel”, “logHertz”, “semitones re 1 Hz”, “semitones re 100 Hz”, “semitones re 200 Hz”, “semitones re 440 Hz”, “ERB”</p>
</dd>
<dt>self.args{‘Algorithm} (str)</dt><dd><p>Either Autocorrelation or Cross Correlation</p>
</dd>
<dt>self.args{“Very Accurate”} (str)</dt><dd><p>No uses 3 pitch periods. Yes uses 6 pitch periods.</p>
</dd>
</dl>
</dd>
</dl>
<p>Use minF0 and maxF0 to set the range of frequencies to search for. Values supplied above. None of the other arguments are used.</p>
</div></blockquote>
<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasurePitchNode.MeasurePitchNode.process">
<span class="sig-name descname"><span class="pre">process</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasurePitchNode.MeasurePitchNode.process" title="Permalink to this definition">¶</a></dt>
<dd><p>The process function is the heart of VoiceLab. It is where all the processing
is done. The process function takes in a single argument, which is an object that contains
all the input data for this process (the input object). This function should return a dictionary, if it works,
or a string with an error message if it does not.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>self</strong> – Used to Access the attributes and methods of the class in python.</p>
</dd>
</dl>
<section id="returns">
<h6>Returns:<a class="headerlink" href="#returns" title="Permalink to this heading">¶</a></h6>
<dl class="field-list">
<dt class="field-odd">returns<span class="colon">:</span></dt>
<dd class="field-odd"><p>A dictionary with the following keys:</p>
<dl class="simple">
<dt>‘Pitches’ (list of floats)</dt><dd><p>List of pitch values.</p>
</dd>
<dt>‘Mean Pitch (F0)’ (float)</dt><dd><p>Mean pitch value in Hz.</p>
</dd>
<dt>‘Standard Deviation (F0)’ (float)</dt><dd><p>Standard deviation of pitch values in Hz.</p>
</dd>
<dt>‘Minimum Pitch (F0)’ (float)</dt><dd><p>Minimum pitch value in Hz.</p>
</dd>
<dt>‘Maximum Pitch (F0)’ (float)</dt><dd><p>Maximum pitch value in Hz.</p>
</dd>
<dt>‘Pitch Floor’ (float)</dt><dd><p>Pitch floor used in manipulation.</p>
</dd>
<dt>‘Pitch Ceiling’ (float)</dt><dd><p>Pitch ceiling used in manipulation.</p>
</dd>
</dl>
</dd>
</dl>
</section>
</dd></dl>

</section>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasurePitchNode.measure_pitch_praat">
<span class="sig-prename descclassname"><span class="pre">voicelab.src.Voicelab.toolkits.Voicelab.MeasurePitchNode.</span></span><span class="sig-name descname"><span class="pre">measure_pitch_praat</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">file_path</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">floor</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">50</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ceiling</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">500</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">method</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">'ac'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">time_step</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0.0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">max_number_of_candidates</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">15</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">silence_threshold</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0.03</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">voicing_threshold</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0.45</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">octave_cost</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0.01</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">octave_jump_cost</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0.35</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">voiced_unvoiced_cost</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0.14</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">unit</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">'Hertz'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">very_accurate</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">'no'</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">List</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasurePitchNode.measure_pitch_praat" title="Permalink to this definition">¶</a></dt>
<dd><p>:param file_path:The path to the audio file to be analyzed.
:type file_path: str
:param floor: The lowest pitch to be considered.
:type floor: int, float
:param ceiling: The highest pitch to be considered.
:type ceiling: int, float
:param method: The algorithm used to find the pitch (autocorrelation or cross correlation).
:type method: str
:param time_step:  The time step used to find the pitch.
:type time_step: float
:param max_number_of_candidates: The maximum number of pitch candidates to be considered.
:type max_number_of_candidates: int
:param silence_threshold:  The threshold used to determine if a frame is silent.
:type silence_threshold: float
:param voicing_threshold: The threshold used to determine if a frame is voiced.
:type voicing_threshold: float
:param octave_cost: degree of favouring of high-frequency candidates, relative to the maximum possible autocorrelation
:type octave_cost: float
:param octave_jump_cost: degree of disfavouring of pitch changes, relative to the maximum possible autocorrelation
:type octave_jump_cost: float
:param voiced_unvoiced_cost: degree of disfavouring of unvoiced frames
:type voiced_unvoiced_cost: float
:param unit: The unit of the pitch. The choices are:</p>
<blockquote>
<div><ul class="simple">
<li><p>Hertz</p></li>
<li><p>Hertz (Logarithmic)</p></li>
<li><p>mel</p></li>
<li><p>logHertz</p></li>
<li><p>semitones re 1 Hz</p></li>
<li><p>semitones re 100 Hz</p></li>
<li><p>semitones re 200 Hz</p></li>
<li><p>semitones re 440 Hz</p></li>
<li><p>ERB</p></li>
</ul>
</div></blockquote>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>very_accurate</strong> (<em>str</em>) – very_accurate is a boolean value that determines if the algorithm used 3 pitch periods or 6. 6 are used if the value is yes.</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p><ul class="simple">
<li><p><strong>pitch</strong>: <em>(parselmouth.Data)</em> - parselmouth pitch object</p></li>
<li><p><strong>mean_f0</strong>: <em>(float)</em> - The mean pitch</p></li>
<li><p><strong>std_f0</strong>: <em>(float)</em> - The standard deviation of the pitch</p></li>
<li><p><strong>min_f0</strong>: <em>(float)</em> - The minimum pitch</p></li>
<li><p><strong>max_f0</strong>: <em>(float)</em> - The maximum pitch</p></li>
</ul>
</p>
</dd>
</dl>
</dd></dl>

</section>
<section id="measure-subharmonics">
<h4>Measure Subharmonics<a class="headerlink" href="#measure-subharmonics" title="Permalink to this heading">¶</a></h4>
<p>This measures subharmonic pitch and subharmonic to harmonic ratio. Subharmonic to harmonic ratio and Subharmonic pitch are measures from Open Sauce (Yu et al., 2019), a Python port of Voice Sauce (Shue et al., 2011).  These measurements do not use any Praat or Parselmouth code.  As in (Shue et al., 2011) and (Yu et al., 2019), subharmonic raw values are padded with NaN values to 201 data points.</p>
<span class="target" id="module-voicelab.src.Voicelab.toolkits.Voicelab.MeasureSHRPNode"></span><dl class="py class">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureSHRPNode.MeasureSHRPNode">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">voicelab.src.Voicelab.toolkits.Voicelab.MeasureSHRPNode.</span></span><span class="sig-name descname"><span class="pre">MeasureSHRPNode</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureSHRPNode.MeasureSHRPNode" title="Permalink to this definition">¶</a></dt>
<dd><dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureSHRPNode.MeasureSHRPNode.process">
<span class="sig-name descname"><span class="pre">process</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">filename</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureSHRPNode.MeasureSHRPNode.process" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns subharmonic-to-harmonic ratio and Pitch from Subharmonics.</p>
</dd></dl>

</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureSHRPNode.compute_shr">
<span class="sig-prename descclassname"><span class="pre">voicelab.src.Voicelab.toolkits.Voicelab.MeasureSHRPNode.</span></span><span class="sig-name descname"><span class="pre">compute_shr</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">log_spectrum</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">min_bin</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">startpos</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">endpos</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">lowerbound</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">upperbound</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">n</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">shift_units</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">shr_threshold</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureSHRPNode.compute_shr" title="Permalink to this definition">¶</a></dt>
<dd><p>“compute subharmonic-to-harmonic ratio for a short-term signal”</p>
<p>returns peak_index = -1 if frame appears to be unvoiced.</p>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureSHRPNode.ethreshold">
<span class="sig-prename descclassname"><span class="pre">voicelab.src.Voicelab.toolkits.Voicelab.MeasureSHRPNode.</span></span><span class="sig-name descname"><span class="pre">ethreshold</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">frames</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureSHRPNode.ethreshold" title="Permalink to this definition">¶</a></dt>
<dd><p>Determine energy threshold for silence.</p>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureSHRPNode.round_half_away_from_zero">
<span class="sig-prename descclassname"><span class="pre">voicelab.src.Voicelab.toolkits.Voicelab.MeasureSHRPNode.</span></span><span class="sig-name descname"><span class="pre">round_half_away_from_zero</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureSHRPNode.round_half_away_from_zero" title="Permalink to this definition">¶</a></dt>
<dd><p>Rounds a number according to round half away from zero method
Args:</p>
<blockquote>
<div><p>x - number [float]</p>
</div></blockquote>
<dl class="simple">
<dt>Returns:</dt><dd><p>q - rounded number [integer]</p>
</dd>
<dt>For example:</dt><dd><p>round_half_away_from_zero(3.5) = 4
round_half_away_from_zero(3.2) = 3
round_half_away_from_zero(-2.7) = -3
round_half_away_from_zero(-4.3) = -4</p>
</dd>
</dl>
<p>The reason for writing our own rounding function is that NumPy uses the
round-half-to-even method. There is a Python round() function, but it
doesn’t work on NumPy vectors. So we wrote our own
round-half-away-from-zero method here.</p>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureSHRPNode.shr_pitch">
<span class="sig-prename descclassname"><span class="pre">voicelab.src.Voicelab.toolkits.Voicelab.MeasureSHRPNode.</span></span><span class="sig-name descname"><span class="pre">shr_pitch</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">wav_data</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">fps</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">window_length</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">frame_shift</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">min_pitch</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">50</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">max_pitch</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">500</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">shr_threshold</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">frame_precision</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">datalen</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureSHRPNode.shr_pitch" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a list of Subharmonic ratios and F0 values computed from wav_data.</p>
<p>wav_data        a vector of data read from a wav file
fps             frames rate of the wav file
windows_length  width of analysis window
frame_shift     distance to move window for each analysis iteration
min_pitch       minimum pitch in Hz used in SHR estimation
max_pitch       maximum pitch in Hz used in SHR estimation
shr_threshold   subharmonic-to-harmonic ratio threshold in the range of</p>
<blockquote>
<div><p>[0,1].  If the estimated SHR is greater than the
threshold, the subharmonic is regarded as F0 candidate.
Otherwise, the harmonic is favored.</p>
</div></blockquote>
<dl class="simple">
<dt>frame_precision maximum number of frames the time alignment can be off</dt><dd><p>by when selecting values for output</p>
</dd>
<dt>datalen         the number of values in the output vector; leftover</dt><dd><p>input data is dropped, and the vector is padded
with NaNs when no input data corresponds to
the output frame time.</p>
</dd>
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureSHRPNode.shrp">
<span class="sig-prename descclassname"><span class="pre">voicelab.src.Voicelab.toolkits.Voicelab.MeasureSHRPNode.</span></span><span class="sig-name descname"><span class="pre">shrp</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">Y</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">Fs</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">F0MinMax</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">[50,</span> <span class="pre">500]</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">frame_length</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">40</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">timestep</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">10</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">SHR_Threshold</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.4</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ceiling</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1250</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">med_smooth</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">CHECK_VOICING</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureSHRPNode.shrp" title="Permalink to this definition">¶</a></dt>
<dd><p>Return pitches for list of samples using subharmonic-to-harmonic ratio.</p>
<p>Given:</p>
<blockquote>
<div><p>Y               input data
Fs              sampling frequency (e.g.: 16000 Hz)
F0MinMax        tuple [minf0 maxf0]; default: [50 550]</p>
<blockquote>
<div><dl class="simple">
<dt>quick solutions:</dt><dd><p>for male speech: [50 250]
for female speech: [120 400]</p>
</dd>
</dl>
</div></blockquote>
<p>frame_length    length of each frame in milliseconds (default: 40 ms)
TimeStep        interval for updating short-term analysis in</p>
<blockquote>
<div><p>millisecond (default: 10 ms)</p>
</div></blockquote>
<dl class="simple">
<dt>SHR_Threshold   subharmonic-to-harmonic ratio threshold in the range of</dt><dd><p>[0,1] (default: 0.4).  If the estimated SHR is
greater than the threshold, the subharmonic is
regarded as F0 candidate. Otherwise, the harmonic
is favored.</p>
</dd>
<dt>Ceiling         upper bound of the frequencies that are used for</dt><dd><p>estimating pitch. (default: 1250 Hz)</p>
</dd>
<dt>med_smooth      the order of the median smoothing (default: 0 - no</dt><dd><p>smoothing)</p>
</dd>
</dl>
<p>CHECK_VOICING   NOT IMPLEMENTED</p>
</div></blockquote>
<p>Return:</p>
<blockquote>
<div><p>f0_time:        an array of the times for the F0 points
f0_value:       an array of the F0 values
SHR:            an array of the subharmonic-to-harmonic ratio for each</p>
<blockquote>
<div><p>frame</p>
</div></blockquote>
<dl class="simple">
<dt>f0_candidates:  a matrix of the f0 candidates for each frame.</dt><dd><p>Currently two f0 values generated for each frame.
Each row (a frame) contains two values in
increasing order, i.e., [low_f0 higher_f0].  For
SHR=0, the first f0 is 0. The purpose of this is
that when you want to test different SHR
thresholds, you don’t need to re-run the whole
algorithm. You can choose to select the lower or
higher value based on the shr value of this frame.</p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureSHRPNode.two_max">
<span class="sig-prename descclassname"><span class="pre">voicelab.src.Voicelab.toolkits.Voicelab.MeasureSHRPNode.</span></span><span class="sig-name descname"><span class="pre">two_max</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">lowerbound</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">upperbound</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">unit_len</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureSHRPNode.two_max" title="Permalink to this definition">¶</a></dt>
<dd><p>Return up to two successive maximum peaks and their indices in x.</p>
<p>Return the magnitudes of the peaks and the indices as two lists.
If the first maximum is less than zero, just return it.  Otherwise
look to the right of the first maximum, and if there is a second
maximum that is greater than zero, add that to the returned lists.</p>
<p>lowerbound and upperbound comprise a closed interval, unlike the
normal python half closed interval.  [RDM XXX: fix this?]</p>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureSHRPNode.wavread">
<span class="sig-prename descclassname"><span class="pre">voicelab.src.Voicelab.toolkits.Voicelab.MeasureSHRPNode.</span></span><span class="sig-name descname"><span class="pre">wavread</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">fn</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureSHRPNode.wavread" title="Permalink to this definition">¶</a></dt>
<dd><p>Read in a 16-bit integer PCM WAV file for processing</p>
<dl>
<dt>Args:</dt><dd><p>fn - filename of WAV file [string]</p>
</dd>
<dt>Returns:</dt><dd><blockquote>
<div><p>y_float - Audio samples in float format [NumPy vector]
y_int - Audio samples in int format [NumPy vector]</p>
</div></blockquote>
<p>fs - Sampling frequency in Hz [integer]</p>
</dd>
</dl>
<p>Emulate the parts of the Matlab wavread function that we need.</p>
<p>Matlab’s wavread is used by voicesauce to read in the wav files for
processing.  As a consequence, all the translated algorithms assume the
data from the wav file is in matlab form, which in this case means a double
precision float between -1 and 1.  The corresponding scipy function returns
the actual integer PCM values from the file, which range between -32768 and
32767.  (matlab’s wavread <em>can</em> return the integers, but does not by
default and voicesauce uses the default).  Consequently, after reading the
data using scipy’s io.wavfile, we convert to float by dividing each integer
by 32768.</p>
<p>Also, save the 16-bit integer data in another NumPy vector.</p>
<p>The input WAV file is assumed to be in 16-bit integer PCM format.</p>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureSHRPNode.window">
<span class="sig-prename descclassname"><span class="pre">voicelab.src.Voicelab.toolkits.Voicelab.MeasureSHRPNode.</span></span><span class="sig-name descname"><span class="pre">window</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">width</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">window_type</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">beta</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureSHRPNode.window" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate a window function (1 dim ndarray) of length width.</p>
<p>Given a window_type from the list ‘rectangular’, ‘triangular’, ‘hanning’,
‘hamming’, ‘blackman’, ‘kaiser’, or at least the first four characters of
one of those strings, return a 1 dimensional ndarray of floats expressing a
window function of length ‘width’ using the ‘window_type’.  ‘beta’ is an
additional input for the kaiser algorithm.  (XXX: kaiser is not currently
implemented.)</p>
</dd></dl>

</section>
</section>
<section id="measure-cpp-cepstral-peak-prominence">
<span id="cpp"></span><h3>Measure CPP (Cepstral Peak Prominence)<a class="headerlink" href="#measure-cpp-cepstral-peak-prominence" title="Permalink to this heading">¶</a></h3>
<p>This measures Cepstral Peak Prominance in Praat. You can adjust interpolation, qeufrency upper and lower bounds, line type, and fit method.</p>
<span class="target" id="module-voicelab.src.Voicelab.toolkits.Voicelab.MeasureCPPNode"></span><dl class="py class">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureCPPNode.MeasureCPPNode">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">voicelab.src.Voicelab.toolkits.Voicelab.MeasureCPPNode.</span></span><span class="sig-name descname"><span class="pre">MeasureCPPNode</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureCPPNode.MeasureCPPNode" title="Permalink to this definition">¶</a></dt>
<dd><p>Measure Cepstral Peak Prominance (CPP) of a sound file.</p>
<section id="arguments">
<h4>Arguments:<a class="headerlink" href="#arguments" title="Permalink to this heading">¶</a></h4>
<dl>
<dt>self.args: dict</dt><dd><p>Dictionary of arguments for the node.</p>
<blockquote>
<div><dl class="simple">
<dt>self.args[“interpolation]”: str, default=”Parabolic”</dt><dd><p>Interpolation method to use.</p>
</dd>
<dt>self.args[“Tilt line qeufrency lower bound”]: Union[float,str], default=0.001</dt><dd><p>line qeufrency lower bound</p>
</dd>
<dt>self.args[“Tilt line qeufrency upper bound”]: Union[float, int], default=0.0</dt><dd><p>line qeufrency upper bound; 0 means the entire range</p>
</dd>
<dt>self.args[“Line type”]: str,  default=”Straight”</dt><dd><p>Line type to use.</p>
</dd>
<dt>self.args[“Fit method”]: str, default=”Robust”</dt><dd><p>Fit method to use.</p>
</dd>
</dl>
</div></blockquote>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureCPPNode.MeasureCPPNode.process">
<span class="sig-name descname"><span class="pre">process</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureCPPNode.MeasureCPPNode.process" title="Permalink to this definition">¶</a></dt>
<dd><p>Measure Cepstral Peak Prominance (CPP) of a sound file.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p>A dictionary containing the CPP value or an error message.</p>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p>dict of str|union[float,str]]</p>
</dd>
</dl>
</dd></dl>

</section>
</dd></dl>

</section>
<section id="measure-duration">
<span id="duration"></span><h3>Measure Duration<a class="headerlink" href="#measure-duration" title="Permalink to this heading">¶</a></h3>
<p>This measures the full duration of the sound file. There are no parameters to adjust.</p>
</section>
<section id="measure-energy">
<span id="energy"></span><h3>Measure Energy<a class="headerlink" href="#measure-energy" title="Permalink to this heading">¶</a></h3>
<p>This is my port of VoiceSauce’s Energy Algorithm.  It is different than the old RMS Energy algorithm in previous
versions of VoiceLab, which was RMS of the file and is still available. This code is not in OpenSauce. It is a line-by
line translation of the Voice Sauce MatLab and Praat Code.  Validation analyses for automatic analysis settings and
Energy can be found <a href="#id23"><span class="problematic" id="id24">`here&lt;https://osf.io/3wr6k/files/&gt;`_</span></a>.</p>
<p>It wass a normal Energy calculation, but the widow size is equal to 5 pitch periods, estimated by my port of Voice
Sauce’s Praat script to Python using the praat-parselmouth package.</p>
<p>This changed in version 2.0.0</p>
<p>In Voice Sauce source code, they report to calculate RMS in the documentation, but instead calculated total energy in each pitch-dependent frame. This means the Energy value in Voice Sauce that was translated to VoiceLab was not scaled for wavelength, and therefore not pitch-independent. Why does this matter?</p>
<p>Lower pitched voices have longer wavelengths, and therefore more energy than higher pitched voices. Voice Sauce is trying to correct for that by making the window length equivalent to a few pitch periods. They take the sum of the energy in each frame, and since they do not divide by the number of frames (in taking the mean for the RMS calculation), there is no pitch correction occurring at that level. If you then take the mean or RMS of the output of Voice Sauce Energy, you would be taking the total energy divided by number of frames in the sound. Higher pitched sounds have shorter wavelengths, and you can fit more of them into a fixed time period, so if your sounds are all the same length, then your measurements are pitch corrected. This doesn’t happen automatically, so the problem is that the longer sounds also have more frames. Thus the measure is confounded.</p>
<p>To fix this I have implemented and RMS calculation at every frame as it says in the Voice Sauce manual. You can see the values are much closer to those given by Praat now, but are different, and that is because of the pitch-dependent frame length. I’ve removed the old calculation of mean energy, and if you are using RMS energy as a single value, that is the RMS of all of the frames. If you want the old calculation, it is in all of the older versions of VoiceLab.</p>
<p>If you are concerned, I recommend anyone who has published using this algorithm, or plans to in Voice Sauce or older versions of VoiceLab, re-run their Energy measurements and use the new values if this is something critical to your findings.</p>
<span class="target" id="module-voicelab.src.Voicelab.toolkits.Voicelab.MeasureEnergyNode"></span><dl class="py class">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureEnergyNode.MeasureEnergyNode">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">voicelab.src.Voicelab.toolkits.Voicelab.MeasureEnergyNode.</span></span><span class="sig-name descname"><span class="pre">MeasureEnergyNode</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureEnergyNode.MeasureEnergyNode" title="Permalink to this definition">¶</a></dt>
<dd><p>Measure Energy like in VoiceSauce</p>
<section id="id1">
<h4>Arguments:<a class="headerlink" href="#id1" title="Permalink to this heading">¶</a></h4>
<blockquote>
<div><dl>
<dt>self.args: dict</dt><dd><p>Dictionary of arguments for the node.</p>
<blockquote>
<div><dl class="simple">
<dt>self.args[“pitch algorithm]”: str, default=”Praat”</dt><dd><p>Pitch method to use. Only Praat is available at the moment</p>
</dd>
<dt>self.args[“start”]: float, default=0.0</dt><dd><p>Time in seconds to start the analysis</p>
</dd>
<dt>self.args[“end”]: float, default=0.0</dt><dd><p>Time in seconds to end the analysis</p>
</dd>
<dt>self.args[“number of periods”]: int, default=5</dt><dd><p>Number of pitch periods to use for the analysis</p>
</dd>
<dt>self.args[‘frameshift’]: int, default=1</dt><dd><p>Number of ms to shift between frames</p>
</dd>
<dt>self.args[‘fmin’]: int, default=40</dt><dd><p>Minimum frequency to use for the analysis. Here we use values from VoiceSauce, not from VoiceLab’s automatic settings in order to replicate the algorthm used in VoiceSauce.</p>
</dd>
<dt>self.args[‘fmax’]: int, default=500</dt><dd><p>Maximum frequency to use for the analysis. Here we use values from VoiceSauce, not from VoiceLab’s automatic settings in order to replicate the algorthm used in VoiceSauce.</p>
</dd>
</dl>
</div></blockquote>
</dd>
</dl>
</div></blockquote>
<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureEnergyNode.MeasureEnergyNode.get_energy_voice_sauce">
<span class="sig-name descname"><span class="pre">get_energy_voice_sauce</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">audio_file_path</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">array</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">str</span></span></span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureEnergyNode.MeasureEnergyNode.get_energy_voice_sauce" title="Permalink to this definition">¶</a></dt>
<dd><p>Get energy from Voice Sauce formula
The formula measures energy the normal way, but the window length is variable based on 5 pitch periods.
I added some extra calculations like RMS and Equivalent Continuous Sound Level (Leq)</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>audio_file_path</strong> (<em>str</em>) – path to audio file</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>energy: Energy values or error message</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>Union[np.array, str]</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureEnergyNode.MeasureEnergyNode.get_times_and_pitches">
<span class="sig-name descname"><span class="pre">get_times_and_pitches</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">audio_file_path</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">pandas.core.frame.DataFrame</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">pandas.core.frame.DataFrame</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureEnergyNode.MeasureEnergyNode.get_times_and_pitches" title="Permalink to this definition">¶</a></dt>
<dd><p>Get raw pitch from Praat. This is used to set the window length for the energy calculation.</p>
<dl class="field-list simple">
<dt class="field-odd">Argument<span class="colon">:</span></dt>
<dd class="field-odd"><p>audio_file_path: path to the audio file</p>
</dd>
<dt class="field-even">Type<span class="colon">:</span></dt>
<dd class="field-even"><p>str</p>
</dd>
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p>time, f0</p>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p>tuple[pd.DataFrame, pd.DataFrame]</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureEnergyNode.MeasureEnergyNode.process">
<span class="sig-name descname"><span class="pre">process</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureEnergyNode.MeasureEnergyNode.process" title="Permalink to this definition">¶</a></dt>
<dd><p>Get energy of a signal using Algorithm from Voice Sauce ported to Python.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p>dictionary with energy values, mean energy, and RMS energy from Praat or error messages</p>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p><dl class="simple">
<dt>Dictionary with the following values:</dt><dd><dl class="simple">
<dt>str | Union[list of Union[float, int], str]</dt><dd><p>energy values or error message</p>
</dd>
<dt>str | Union[float, int, str]</dt><dd><p>mean energy or error message</p>
</dd>
<dt>str | Union[float, int, str]</dt><dd><p>RMS energy from Praat or error message</p>
</dd>
</dl>
</dd>
</dl>
</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureEnergyNode.MeasureEnergyNode.refine_pitch_voice_sauce">
<span class="sig-name descname"><span class="pre">refine_pitch_voice_sauce</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">times</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">DataFrame</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">frequencies</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">DataFrame</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">array</span></span></span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureEnergyNode.MeasureEnergyNode.refine_pitch_voice_sauce" title="Permalink to this definition">¶</a></dt>
<dd><p>Refine praat Pitch to remove undefined values, and interpolate values to match our time step.</p>
<dl class="field-list simple">
<dt class="field-odd">Argument<span class="colon">:</span></dt>
<dd class="field-odd"><p>times: np.array</p>
</dd>
<dt class="field-even">Type<span class="colon">:</span></dt>
<dd class="field-even"><p>times: np.array</p>
</dd>
<dt class="field-odd">Argument<span class="colon">:</span></dt>
<dd class="field-odd"><p>frequencies: np.array</p>
</dd>
<dt class="field-even">Type<span class="colon">:</span></dt>
<dd class="field-even"><p>frequencies: np.array</p>
</dd>
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p>f0: refined fundamental frequency values</p>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p>np.array</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureEnergyNode.MeasureEnergyNode.round_half_away_from_zero">
<span class="sig-name descname"><span class="pre">round_half_away_from_zero</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">int64</span></span></span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureEnergyNode.MeasureEnergyNode.round_half_away_from_zero" title="Permalink to this definition">¶</a></dt>
<dd><p>Rounds a number according to round half away from zero method</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>x</strong> (<em>Union</em><em>[</em><em>float</em><em>, </em><em>int</em><em>]</em>) – number to round</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>rounded number</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><a href="#id25"><span class="problematic" id="id26">np.int_</span></a></p>
</dd>
</dl>
<dl class="simple">
<dt>For example:</dt><dd><ul class="simple">
<li><p>round_half_away_from_zero(3.5) = 4</p></li>
<li><p>round_half_away_from_zero(3.2) = 3</p></li>
<li><p>round_half_away_from_zero(-2.7) = -3</p></li>
<li><p>round_half_away_from_zero(-4.3) = -4</p></li>
</ul>
</dd>
</dl>
<p>The reason for writing our own rounding function is that NumPy uses the round-half-to-even method. There is a Python round() function, but it doesn’t work on NumPy vectors. So we wrote our own round-half-away-from-zero method here.</p>
</dd></dl>

</section>
</dd></dl>

</section>
<section id="measure-formants">
<span id="formants"></span><h3>Measure Formants<a class="headerlink" href="#measure-formants" title="Permalink to this heading">¶</a></h3>
<p>This returns the mean of the first 4 formant frequencies of the voice using the <code class="code highlight python docutils literal highlight-python"><span class="n">To</span> <span class="n">FormantPath</span></code> algorithm using
5.5 maximum number of formants and a variable centre frequency, set automatically or user-specified.  All other values
are Praat defaults for Formant Path.  Formant path picks the best formant ceiling value by fitting each prediction to a
polynomial curve, and choosing the best fit for each formant. The centre frequency is determined in the automatic
settings You can also use your own settings for <code class="code highlight python docutils literal highlight-python"><span class="n">To</span> <span class="n">Formant</span> <span class="n">Burg</span><span class="o">...</span></code> if you want to.</p>
<span class="target" id="module-voicelab.src.Voicelab.toolkits.Voicelab.MeasureFormantNode"></span><dl class="py class">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureFormantNode.MeasureFormantNode">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">voicelab.src.Voicelab.toolkits.Voicelab.MeasureFormantNode.</span></span><span class="sig-name descname"><span class="pre">MeasureFormantNode</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureFormantNode.MeasureFormantNode" title="Permalink to this definition">¶</a></dt>
<dd><p>Measure formant frequencies using Praat’s Formant Path Function.</p>
<section id="id2">
<h4>Arguments:<a class="headerlink" href="#id2" title="Permalink to this heading">¶</a></h4>
<blockquote>
<div><dl>
<dt>self.args<span class="classifier">dict</span></dt><dd><p>Arguments for the node
self.args[‘time step’] : Union[float, int], default=0.0025</p>
<blockquote>
<div><p>Time step in seconds</p>
</div></blockquote>
<dl class="simple">
<dt>self.args[‘max number of formants’]<span class="classifier">Union[float, int], default=5.5</span></dt><dd><p>Maximum number of formants is used to set the number of poles in the LPC filter.  The number of poles is 2x this number.</p>
</dd>
<dt>self.args[‘window length’]<span class="classifier">bool, default=True</span></dt><dd><p>Normalize amplitude to 70 dB RMS</p>
</dd>
<dt>self.args[‘pre-emphasis’]: Union[float, int], default=50</dt><dd><p>Pre-emphasis filter coefficient: the frequency F above which the spectral slope will increase by 6 dB/octave.</p>
</dd>
<dt>self.args[‘max_formant (To Formant Burg…)’]: Union[float, int], default=5500</dt><dd><p>Maximum formant frequency in Hz. This is the nyquist frequency for resampling prior to LPC analysis. Sounds will be resampled to 2x this number. This is for the Formant Burg analysis, a fallback in-case Formant Path fails or is not selected.</p>
</dd>
<dt>self.args[“Center Formant (Formant Path)”]: Union[float, int], default=5500</dt><dd><p>This is the centre frequency for the Formant Path analysis. This is the nyquist frequency for resampling prior to LPC analysis. Sounds will be resampled to 2x this number. Formant Path will measure formants using this value and several others, depending on the number of steps and ceiling step size.</p>
</dd>
<dt>self.args[“Ceiling Step Size (Formant Path)”]: Union[float, int], default=0.05</dt><dd><p>This is the size of steps in the Formant Path analysis. This is the nyquist frequency for resampling prior to LPC analysis. Sounds will be resampled to 2x this number. Praat will measure formants at a number of steps up and down of this size.</p>
</dd>
<dt>self.args[“Number of Steps (Formant Path)”]: Union[float, int], default=4</dt><dd><p>This is the number of steps in the Formant Path analysis. This is the nyquist frequency for resampling prior to LPC analysis. This is the number of formant analyses to perform.</p>
</dd>
<dt>self.args[‘method’]: str, default=’Formant Path’</dt><dd><p>Method to use for formant measurement. Options are: Formant Path or Formant Burg.</p>
</dd>
</dl>
</dd>
</dl>
</div></blockquote>
<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureFormantNode.MeasureFormantNode.end">
<span class="sig-name descname"><span class="pre">end</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">results</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureFormantNode.MeasureFormantNode.end" title="Permalink to this definition">¶</a></dt>
<dd><p>This passes the data on to State for post-processing of VTL estimates</p>
<dl class="field-list simple">
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p>results: a dictionary of the results containing the output from process()</p>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p>dict</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureFormantNode.MeasureFormantNode.measure_formants_burg">
<span class="sig-name descname"><span class="pre">measure_formants_burg</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">filename</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">time_step</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">max_number_of_formants</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">max_formant</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">window_length</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">pre_emphasis</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureFormantNode.MeasureFormantNode.measure_formants_burg" title="Permalink to this definition">¶</a></dt>
<dd><p>This function measures the formants using the formant_burg method</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>filename</strong> – the name of the file to measure</p></li>
<li><p><strong>time_step</strong> – the time step to use for the analysis</p></li>
<li><p><strong>max_number_of_formants</strong> – the maximum number of formants to measure</p></li>
<li><p><strong>max_formant</strong> – the maximum formant to measure</p></li>
<li><p><strong>window_length</strong> – the window length to use for the analysis</p></li>
<li><p><strong>pre_emphasis</strong> – the pre-emphasis to use for the analysis</p></li>
</ul>
</dd>
<dt class="field-even">Type<span class="colon">:</span></dt>
<dd class="field-even"><p>filename: str</p>
</dd>
<dt class="field-odd">Type<span class="colon">:</span></dt>
<dd class="field-odd"><p>time_step: float</p>
</dd>
<dt class="field-even">Type<span class="colon">:</span></dt>
<dd class="field-even"><p>max_number_of_formants: int</p>
</dd>
<dt class="field-odd">Type<span class="colon">:</span></dt>
<dd class="field-odd"><p>max_formant: float</p>
</dd>
<dt class="field-even">Type<span class="colon">:</span></dt>
<dd class="field-even"><p>window_length: float</p>
</dd>
<dt class="field-odd">Type<span class="colon">:</span></dt>
<dd class="field-odd"><p>pre_emphasis: float</p>
</dd>
<dt class="field-even">Return formant_object<span class="colon">:</span></dt>
<dd class="field-even"><p>a praat formant object</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>parselmouth.Formant</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureFormantNode.MeasureFormantNode.process">
<span class="sig-name descname"><span class="pre">process</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureFormantNode.MeasureFormantNode.process" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the means and medians of the 1st 4 formants, and the Praat formant object for use in VTL estimates and plots.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p>The max formant value</p>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p>int</p>
</dd>
</dl>
</dd></dl>

</section>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureFormantNode.get_values_function">
<span class="sig-prename descclassname"><span class="pre">voicelab.src.Voicelab.toolkits.Voicelab.MeasureFormantNode.</span></span><span class="sig-name descname"><span class="pre">get_values_function</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">object</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">fn</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">command</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureFormantNode.get_values_function" title="Permalink to this definition">¶</a></dt>
<dd><p>This function returns the values of a function from a praat formant object. This is used to make a vectorized NumPy function to reduce nested loops.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>object</strong> – the praat formant object</p></li>
<li><p><strong>fn</strong> – the function to return</p></li>
<li><p><strong>command</strong> – the command to use to get the values</p></li>
</ul>
</dd>
<dt class="field-even">Type<span class="colon">:</span></dt>
<dd class="field-even"><p>object: parselmouth.Formant</p>
</dd>
<dt class="field-odd">Type<span class="colon">:</span></dt>
<dd class="field-odd"><p>fn: function</p>
</dd>
<dt class="field-even">Type<span class="colon">:</span></dt>
<dd class="field-even"><p>command: str</p>
</dd>
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p>values: individual formant values</p>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p>Union[float, int]</p>
</dd>
</dl>
</dd></dl>

</section>
<section id="measure-vocal-tract-length-estimates">
<h3>Measure Vocal Tract Length Estimates<a class="headerlink" href="#measure-vocal-tract-length-estimates" title="Permalink to this heading">¶</a></h3>
<p>This returns the following vocal tract length estimates:</p>
<section id="average-formant">
<h4>Average Formant<a class="headerlink" href="#average-formant" title="Permalink to this heading">¶</a></h4>
<p>This calculates the mean <span class="math notranslate nohighlight">\(\frac {\sum _{i=1}^{n} {f_i}}{n}\)</span> of the first four formant frequencies for each sound.</p>
<p>Pisanski, K., &amp; Rendall, D. (2011). The prioritization of voice fundamental frequency or formants in listeners’ assessments of speaker size, masculinity, and attractiveness. The Journal of the Acoustical Society of America, 129(4), 2201-2212.</p>
</section>
<section id="principle-components-analysis">
<h4>Principle Components Analysis<a class="headerlink" href="#principle-components-analysis" title="Permalink to this heading">¶</a></h4>
<p>This returns the first factor from a Principle Components Analysis (PCA) of the 4 formants.</p>
<p>Babel, M., McGuire, G., &amp; King, J. (2014). Towards a more nuanced view of vocal attractiveness. PloS one, 9(2), e88616.</p>
</section>
<section id="geometric-mean">
<h4>Geometric Mean<a class="headerlink" href="#geometric-mean" title="Permalink to this heading">¶</a></h4>
<p>This calculates the geometric mean <span class="math notranslate nohighlight">\(\left(\prod _{i=1}^{n}f_{i}\right)^{\frac {1}{n}}\)</span> of the first 4 formant frequencies for each sound.</p>
<p>Smith, D. R., &amp; Patterson, R. D. (2005). The interaction of glottal-pulse rate andvocal-tract length in judgements of speaker size, sex, and age.Journal of theAcoustical Society of America, 118, 3177e3186.</p>
</section>
<section id="formant-dispersion">
<h4>Formant Dispersion<a class="headerlink" href="#formant-dispersion" title="Permalink to this heading">¶</a></h4>
<p><span class="math notranslate nohighlight">\(\frac {\sum _{i=2}^{n} {f_i - f_{i-1}}}{n}\)</span></p>
<p>Fitch, W. T. (1997). Vocal-tract length and formant frequency dispersion correlate with body size in rhesus macaques.Journal of the Acoustical Society of America,102,1213e1222.</p>
</section>
<section id="vtl">
<h4>VTL<a class="headerlink" href="#vtl" title="Permalink to this heading">¶</a></h4>
<p><span class="math notranslate nohighlight">\(\frac {\sum _{i=1}^{n} (2n-1) \frac {f_i}{4c}}{n}\)</span></p>
<p>Fitch, W. T. (1997). Vocal-tract length and formant frequency dispersion correlate with body size in rhesus macaques.Journal of the Acoustical Society of America,102,1213e1222.</p>
<p>Titze, I. R. (1994).Principles of voice production. Englewood Cliffs, NJ: Prentice Hall.</p>
</section>
<section id="vtl-f">
<h4>VTL Δf<a class="headerlink" href="#vtl-f" title="Permalink to this heading">¶</a></h4>
<p><span class="math notranslate nohighlight">\(f_i\)</span> = The slope of 0 intercept regression between <span class="math notranslate nohighlight">\(F_i = \frac {(2i-1)}{2} Δf\)</span> and the mean of each of the first 4 formant frequencies.</p>
<p><span class="math notranslate nohighlight">\(VTL f_i = \frac {\sum _{i=1}^{n} (2n-1)(\frac {c}{4f_i})}{n}\)</span></p>
<p><span class="math notranslate nohighlight">\(VTL \Delta f = \frac {c}{2Δf}\)</span></p>
<p>Reby,D.,&amp;McComb,K.(2003).Anatomical constraints generate honesty: acoustic cues to age and weight in the roars of red deer stags. Animal Behaviour, 65,519e530.</p>
</section>
<section id="measure-formant-positions-node">
<span id="formant-position"></span><h4>Measure Formant Positions Node<a class="headerlink" href="#measure-formant-positions-node" title="Permalink to this heading">¶</a></h4>
<p>This node measures formant position. This node is executed by MeasureVocalTractEstimatesNode.</p>
<p>Formant Position is set to only run on samples of 30 or greater because this measure is based on scaling the data. Without a large enough sample, this measurement could be suspicious.</p>
<dl>
<dt>The algorithm is as follows:</dt><dd><ul>
<li><p>First, measure formants at each gottal pulse.</p></li>
<li><p>Second, scale each formant separately.</p></li>
<li><p>Third, find the mean of the scaled formants.</p>
<blockquote>
<div><ul class="simple">
<li><p><span class="math notranslate nohighlight">\(\frac{1}{n} {\sum _{i=1}^{n}{f_i}}\)</span></p></li>
</ul>
</div></blockquote>
</li>
</ul>
</dd>
</dl>
<p>This algorithm deviates from the original in that it checks the data for a normal distribution before applying the z-score. If it is not normally distributed, it uses Scikit Learn’s <a class="reference external" href="https://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.RobustScaler.html">Robust Scalar</a>
The scalar method is recorded in the voicelab_settings.xlsx file.</p>
<p>Puts, D. A., Apicella, C. L., &amp; Cárdenas, R. A. (2011). Masculine voices signal men’s threat potential in forager and industrial societies. Proceedings of the Royal Society B: Biological Sciences, 279(1728), 601-609.</p>
<span class="target" id="module-voicelab.src.Voicelab.toolkits.Voicelab.MeasureVocalTractEstimatesNode"></span><dl class="py class">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureVocalTractEstimatesNode.MeasureVocalTractEstimatesNode">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">voicelab.src.Voicelab.toolkits.Voicelab.MeasureVocalTractEstimatesNode.</span></span><span class="sig-name descname"><span class="pre">MeasureVocalTractEstimatesNode</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureVocalTractEstimatesNode.MeasureVocalTractEstimatesNode" title="Permalink to this definition">¶</a></dt>
<dd><p>Measure Voice Tract Estimates Node</p>
<section id="id3">
<h5>Arguments:<a class="headerlink" href="#id3" title="Permalink to this heading">¶</a></h5>
<dl>
<dt>self.args: dict</dt><dd><p>Dictionary of arguments passed to the node
self.args[“Measure Formant PCA”]: bool</p>
<blockquote>
<div><p>Whether to measure the formant PCA</p>
</div></blockquote>
<dl class="simple">
<dt>self.args[“Measure Formant Positions”]: bool</dt><dd><p>Whether to measure the formant positions</p>
</dd>
<dt>self.args[“Measure Formant Dispersion”]: bool</dt><dd><p>Whether to measure the formant dispersion</p>
</dd>
<dt>self.args[“Measure Average Formant”]: bool</dt><dd><p>Whether to measure the average formant</p>
</dd>
<dt>self.args[“Measure Geometric Mean”]: bool</dt><dd><p>Whether to measure the geometric mean</p>
</dd>
<dt>self.args[“Measure Fitch VTL”]: bool</dt><dd><p>Whether to measure Fitch VTL</p>
</dd>
<dt>self.args[“Measure Delta F”]: bool</dt><dd><p>Whether to measure Delta F</p>
</dd>
<dt>self.args[“Measure VTL Delta F”]: bool</dt><dd><p>Whether to measure VTL Delta F</p>
</dd>
</dl>
</dd>
<dt>self.state: dict</dt><dd><p>Dictionary of state variables passed to the node. This includes the mean formants measured by MeasureFormantsNode.</p>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureVocalTractEstimatesNode.MeasureVocalTractEstimatesNode.end">
<span class="sig-name descname"><span class="pre">end</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">results</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureVocalTractEstimatesNode.MeasureVocalTractEstimatesNode.end" title="Permalink to this definition">¶</a></dt>
<dd><p>This node does all of the vocal tract length calculations. To employ this code outside of the VoiceLab GUI, you’ll need to supply a state dictionary with 4 keys:</p>
<blockquote>
<div><ul class="simple">
<li><p>self.state[“f1 means”]</p></li>
<li><p>self.state[“f2 means”]</p></li>
<li><p>self.state[“f3 means”]</p></li>
<li><p>self.state[“f4 means”]</p></li>
</ul>
<p>In the GUI, these are supplied via self (ie they are instance attributes).</p>
</div></blockquote>
<p>Each of those values should be a list of the formant means for each file.</p>
<p>You’ll also need to supply a dictionary of the arguments to the node. The keys are set in the process() method in the GUI, but you can set them on your own. They are as follows:</p>
<blockquote>
<div><ul class="simple">
<li><p>“Measure Formant PCA”: True</p></li>
<li><p>“Measure Formant Positions”: True</p></li>
<li><p>“Measure Formant Dispersion”: True</p></li>
<li><p>“Measure Average Formant”: True</p></li>
<li><p>“Measure Geometric Mean”: True</p></li>
<li><p>“Measure Fitch VTL”: True</p></li>
<li><p>“Measure Delta F”: True</p></li>
<li><p>“Measure VTL Delta F”: True</p></li>
</ul>
</div></blockquote>
<p>As of now, all measurements except Formant Positions are calculated in this function (I know, I know).  Formant Positions are calculated in the FormantPositionsNode, and is documented <a class="reference internal" href="#formant-position"><span class="std std-ref">here</span></a>.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>results</strong> (<em>dict</em>) – The results of the pipeline run.</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>The selected vocal-tract-length estimates or an error message, or note that some measurements were not selected.</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>dict of Union[float, str]</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureVocalTractEstimatesNode.MeasureVocalTractEstimatesNode.get_average_formant">
<span class="sig-name descname"><span class="pre">get_average_formant</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">f1</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">f2</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">f3</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">f4</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">int</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">float</span></span></span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureVocalTractEstimatesNode.MeasureVocalTractEstimatesNode.get_average_formant" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the average formant from F1, F2, F3, and F4.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>f1</strong> (<em>Union</em><em>[</em><em>float</em><em>, </em><em>int</em><em>]</em>) – The first formant in Hz</p></li>
<li><p><strong>f2</strong> (<em>Union</em><em>[</em><em>float</em><em>, </em><em>int</em><em>]</em>) – The second formant in Hz</p></li>
<li><p><strong>f3</strong> (<em>Union</em><em>[</em><em>float</em><em>, </em><em>int</em><em>]</em>) – The third formant in Hz</p></li>
<li><p><strong>f4</strong> (<em>Union</em><em>[</em><em>float</em><em>, </em><em>int</em><em>]</em>) – The fourth formant in Hz</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>The average formant</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>float</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureVocalTractEstimatesNode.MeasureVocalTractEstimatesNode.get_delta_f">
<span class="sig-name descname"><span class="pre">get_delta_f</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">f1</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">f2</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">f3</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">f4</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">int</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">float</span></span></span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureVocalTractEstimatesNode.MeasureVocalTractEstimatesNode.get_delta_f" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the delta f from the formants.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>f1</strong> (<em>Union</em><em>[</em><em>float</em><em>, </em><em>int</em><em>]</em>) – The first formant in Hz</p></li>
<li><p><strong>f2</strong> (<em>Union</em><em>[</em><em>float</em><em>, </em><em>int</em><em>]</em>) – The second formant in Hz</p></li>
<li><p><strong>f3</strong> (<em>Union</em><em>[</em><em>float</em><em>, </em><em>int</em><em>]</em>) – The third formant in Hz</p></li>
<li><p><strong>f4</strong> (<em>Union</em><em>[</em><em>float</em><em>, </em><em>int</em><em>]</em>) – The fourth formant in Hz</p></li>
</ul>
</dd>
<dt class="field-even">Return delta_f<span class="colon">:</span></dt>
<dd class="field-even"><p>The delta f</p>
</dd>
<dt class="field-odd">Rtype delta_f<span class="colon">:</span></dt>
<dd class="field-odd"><p>float</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureVocalTractEstimatesNode.MeasureVocalTractEstimatesNode.get_fitch_vtl">
<span class="sig-name descname"><span class="pre">get_fitch_vtl</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">f1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">f2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">f3</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">f4</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureVocalTractEstimatesNode.MeasureVocalTractEstimatesNode.get_fitch_vtl" title="Permalink to this definition">¶</a></dt>
<dd><p>Get Fitch VTL from the formants.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>f1</strong> (<em>Union</em><em>[</em><em>float</em><em>, </em><em>int</em><em>]</em>) – The first formant in Hz</p></li>
<li><p><strong>f2</strong> (<em>Union</em><em>[</em><em>float</em><em>, </em><em>int</em><em>]</em>) – The second formant in Hz</p></li>
<li><p><strong>f3</strong> (<em>Union</em><em>[</em><em>float</em><em>, </em><em>int</em><em>]</em>) – The third formant in Hz</p></li>
<li><p><strong>f4</strong> (<em>Union</em><em>[</em><em>float</em><em>, </em><em>int</em><em>]</em>) – The fourth formant in Hz</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>The Fitch VTL</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>float</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureVocalTractEstimatesNode.MeasureVocalTractEstimatesNode.get_formant_dispersion">
<span class="sig-name descname"><span class="pre">get_formant_dispersion</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">f1</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">f4</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">int</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">float</span></span></span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureVocalTractEstimatesNode.MeasureVocalTractEstimatesNode.get_formant_dispersion" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the formant dispersion from F1 and F4. Since F2 and F3 cancel each other out in the equation, we save
time and memeory and only ask for the 2 formants. args and kwargs are there in case people add F2 and F3 so
it doesn’t crash</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>f1</strong> (<em>Union</em><em>[</em><em>float</em><em>, </em><em>int</em><em>]</em>) – The first formant in Hz</p></li>
<li><p><strong>f4</strong> (<em>Union</em><em>[</em><em>float</em><em>, </em><em>int</em><em>]</em>) – The fourth formant in Hz</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>The formant dispersion</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>float</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureVocalTractEstimatesNode.MeasureVocalTractEstimatesNode.get_formants_pca">
<span class="sig-name descname"><span class="pre">get_formants_pca</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureVocalTractEstimatesNode.MeasureVocalTractEstimatesNode.get_formants_pca" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the formants from the PCA.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p>The PCA of the formants</p>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p>list</p>
</dd>
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p>THe PCA object</p>
</dd>
</dl>
<p>:</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureVocalTractEstimatesNode.MeasureVocalTractEstimatesNode.get_geometric_mean">
<span class="sig-name descname"><span class="pre">get_geometric_mean</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">f1</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">f2</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">f3</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">f4</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">int</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">float</span></span></span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureVocalTractEstimatesNode.MeasureVocalTractEstimatesNode.get_geometric_mean" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the geometric mean of the formants.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>f1</strong> (<em>float</em><em> | </em><em>int</em>) – The first formant in Hz</p></li>
<li><p><strong>f2</strong> (<em>float</em><em> | </em><em>int</em>) – The second formant in Hz</p></li>
<li><p><strong>f3</strong> (<em>float</em><em> | </em><em>int</em>) – The third formant in Hz</p></li>
<li><p><strong>f4</strong> (<em>float</em><em> | </em><em>int</em>) – The fourth formant in Hz</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>The geometric mean of the formants</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>float</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureVocalTractEstimatesNode.MeasureVocalTractEstimatesNode.get_vtl_delta_f">
<span class="sig-name descname"><span class="pre">get_vtl_delta_f</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">f1</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">f2</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">f3</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">f4</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">float</span></span></span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureVocalTractEstimatesNode.MeasureVocalTractEstimatesNode.get_vtl_delta_f" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the VTL delta f from the formants.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>f1</strong> (<em>Union</em><em>[</em><em>float</em><em>, </em><em>int</em><em>]</em>) – The first formant in Hz</p></li>
<li><p><strong>f2</strong> (<em>Union</em><em>[</em><em>float</em><em>, </em><em>int</em><em>]</em>) – The second formant in Hz</p></li>
<li><p><strong>f3</strong> (<em>Union</em><em>[</em><em>float</em><em>, </em><em>int</em><em>]</em>) – The third formant in Hz</p></li>
<li><p><strong>f4</strong> (<em>Union</em><em>[</em><em>float</em><em>, </em><em>int</em><em>]</em>) – The fourth formant in Hz</p></li>
</ul>
</dd>
<dt class="field-even">Return delta_f<span class="colon">:</span></dt>
<dd class="field-even"><p>The delta f</p>
</dd>
<dt class="field-odd">Rtype delta_f<span class="colon">:</span></dt>
<dd class="field-odd"><p>float</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureVocalTractEstimatesNode.MeasureVocalTractEstimatesNode.process">
<span class="sig-name descname"><span class="pre">process</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureVocalTractEstimatesNode.MeasureVocalTractEstimatesNode.process" title="Permalink to this definition">¶</a></dt>
<dd><p>Estimate Vocal Tract Length using several methods
The process node runs on each sound file in the pipeline run, and passes the data on to state for processing in the end() method run.</p>
<section id="id4">
<h6>Returns:<a class="headerlink" href="#id4" title="Permalink to this heading">¶</a></h6>
<dl class="field-list simple">
<dt class="field-odd">return<span class="colon">:</span></dt>
<dd class="field-odd"><p>A dictionary of the results or an error message. The number of varaibles returned depends on the arguments passed to the node.</p>
</dd>
<dt class="field-even">rtype<span class="colon">:</span></dt>
<dd class="field-even"><p>dict[str, Union[float, str]</p>
</dd>
</dl>
</section>
</dd></dl>

</section>
</dd></dl>

<span class="target" id="module-voicelab.src.Voicelab.toolkits.Voicelab.MeasureFormantPositionsNode"></span><dl class="py class">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureFormantPositionsNode.MeasureFormantPositionsNode">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">voicelab.src.Voicelab.toolkits.Voicelab.MeasureFormantPositionsNode.</span></span><span class="sig-name descname"><span class="pre">MeasureFormantPositionsNode</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureFormantPositionsNode.MeasureFormantPositionsNode" title="Permalink to this definition">¶</a></dt>
<dd><p>Measure Formnat Positions Node. This measures formant frequency position. This code is called from the MeasureVocalTractEstimatesNode. It’s recommended you use that node to access this code.</p>
<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureFormantPositionsNode.MeasureFormantPositionsNode.calculate_formant_position">
<span class="sig-name descname"><span class="pre">calculate_formant_position</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">formant_mean_lists</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureFormantPositionsNode.MeasureFormantPositionsNode.calculate_formant_position" title="Permalink to this definition">¶</a></dt>
<dd><p>Calculate the formant position for each voice.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>formant_mean_lists</strong> (<em>list</em>) – List of lists of formant means.</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Formant position and normalization type.</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>tuple of (Union[float, str, list, np.ndarray], str)</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureFormantPositionsNode.MeasureFormantPositionsNode.end">
<span class="sig-name descname"><span class="pre">end</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">results</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureFormantPositionsNode.MeasureFormantPositionsNode.end" title="Permalink to this definition">¶</a></dt>
<dd><dl class="simple">
<dt>Args:</dt><dd><p>results:</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureFormantPositionsNode.MeasureFormantPositionsNode.process">
<span class="sig-name descname"><span class="pre">process</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureFormantPositionsNode.MeasureFormantPositionsNode.process" title="Permalink to this definition">¶</a></dt>
<dd><p>This runs the formant position measurement on each file. Results are passed to the end() method where they are sent to the Data Model.</p>
<dl class="field-list simple">
<dt class="field-odd">Return results<span class="colon">:</span></dt>
<dd class="field-odd"><p>A dictionary of results for each file.</p>
</dd>
<dt class="field-even">Rtype results<span class="colon">:</span></dt>
<dd class="field-even"><p>dict</p>
</dd>
</dl>
</dd></dl>

</dd></dl>

</section>
</section>
<section id="measure-harmonicity">
<span id="hnr"></span><h3>Measure Harmonicity<a class="headerlink" href="#measure-harmonicity" title="Permalink to this heading">¶</a></h3>
<p>This measures mean harmonics-to-noise-ratio using automatic floor and ceiling settings described <a class="reference internal" href="#floor-ceiling"><span class="std std-ref">here.</span></a>  Full details of the algorithm can be found in the <a href="#id27"><span class="problematic" id="id28">`Praat Manual Harmonicity Page&lt;http://www.fon.hum.uva.nl/praat/manual/Harmonicity.html&gt;`_</span></a>. By default Voice Lab use <code class="code highlight python docutils literal highlight-python"><span class="n">To</span> <span class="n">Harmonicity</span> <span class="p">(</span><span class="n">cc</span><span class="p">)</span><span class="o">..</span></code>. You can select <code class="code highlight python docutils literal highlight-python"><span class="n">To</span> <span class="n">Harmonicity</span> <span class="p">(</span><span class="n">ac</span><span class="p">)</span></code> or change any other Praat parameters if you wish.</p>
<span class="target" id="module-voicelab.src.Voicelab.toolkits.Voicelab.MeasureHarmonicityNode"></span><dl class="py class">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureHarmonicityNode.MeasureHarmonicityNode">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">voicelab.src.Voicelab.toolkits.Voicelab.MeasureHarmonicityNode.</span></span><span class="sig-name descname"><span class="pre">MeasureHarmonicityNode</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureHarmonicityNode.MeasureHarmonicityNode" title="Permalink to this definition">¶</a></dt>
<dd><p>Measure the harmonics-to-noise ratio of a sound. This is effetively the Signal-to-Noise Ratio (SNR) of a periodic sound.</p>
<section id="id5">
<h4>Arguments:<a class="headerlink" href="#id5" title="Permalink to this heading">¶</a></h4>
<blockquote>
<div><dl>
<dt>self.args: dict</dt><dd><p>Dictionary of arguments for the node.
self.args[‘Algorithm’] : str, default=To Harmonicity (cc)’</p>
<blockquote>
<div><p>Which pitch algorithm to use. Default is Cross Correlation, alternate is Auto Correlation.</p>
</div></blockquote>
<dl class="simple">
<dt>self.args[‘Timestep’]<span class="classifier">float, default 0.01</span></dt><dd><p>The timestep (hop length/time between windows) to use for the analysis.</p>
</dd>
<dt>self.args[“Silence Threshold”]: float, default=0.1,</dt><dd><p>The threshold below which a frame is considered silent.</p>
</dd>
<dt>self.args[“Periods per Window”]: float, default=4.5,</dt><dd><p>The number of periods per window.</p>
</dd>
</dl>
</dd>
</dl>
</div></blockquote>
<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureHarmonicityNode.MeasureHarmonicityNode.process">
<span class="sig-name descname"><span class="pre">process</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureHarmonicityNode.MeasureHarmonicityNode.process" title="Permalink to this definition">¶</a></dt>
<dd><p>This function measures Harmonics to Noise Ratio</p>
<dl class="field-list simple">
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p>A dictionary of the results or an error message.</p>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p>dict[str, Union[str, float]]</p>
</dd>
</dl>
</dd></dl>

</section>
</dd></dl>

</section>
<section id="measure-intensity">
<h3>Measure Intensity<a class="headerlink" href="#measure-intensity" title="Permalink to this heading">¶</a></h3>
<p>This returns the mean of Praat’s  <code class="code highlight python docutils literal highlight-python"><span class="n">Sound</span><span class="p">:</span> <span class="n">To</span> <span class="n">Intensity</span><span class="o">...</span></code> function in dB. You can adjust the minimum pitch parameter. For more information, see Praat
s <a class="reference external" href="https://www.fon.hum.uva.nl/praat/manual/Intro_6_2__Configuring_the_intensity_contour.html">Configuring the intensity contour Page</a>.</p>
<span class="target" id="module-voicelab.src.Voicelab.toolkits.Voicelab.MeasureIntensityNode"></span><dl class="py class">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureIntensityNode.MeasureIntensityNode">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">voicelab.src.Voicelab.toolkits.Voicelab.MeasureIntensityNode.</span></span><span class="sig-name descname"><span class="pre">MeasureIntensityNode</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureIntensityNode.MeasureIntensityNode" title="Permalink to this definition">¶</a></dt>
<dd><p>Measure Intensity (dB) of sound
Arguments:</p>
<blockquote>
<div><dl>
<dt>self.args: dict of arguments</dt><dd><p>These are the Intensity options from Praat:
minimum_pitch Union[float, int], default 100.0</p>
<blockquote>
<div><p>The minimum pitch for the analysis. This sets the analysis window to 0.8 / minimum pitch</p>
</div></blockquote>
<dl class="simple">
<dt>time step: float, default 0.0 (Automatic)</dt><dd><p>The time step (hop length) for the analysis</p>
</dd>
<dt>Subtract Mean: bool, default True</dt><dd><p>Subtract the mean intensity from the intensity</p>
</dd>
</dl>
</dd>
</dl>
</div></blockquote>
<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureIntensityNode.MeasureIntensityNode.process">
<span class="sig-name descname"><span class="pre">process</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureIntensityNode.MeasureIntensityNode.process" title="Permalink to this definition">¶</a></dt>
<dd><p>Run the intensity analysis</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>self.args</strong><strong>[</strong><strong>'file_path'</strong><strong>]</strong> (<em>str</em>) – the path to the file to be analysed</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>dict of results</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>dict[str, Union[int, float, str, list]]</p>
</dd>
</dl>
</dd></dl>

</dd></dl>

</section>
<section id="measure-jitter">
<span id="jitter"></span><h3>Measure Jitter<a class="headerlink" href="#measure-jitter" title="Permalink to this heading">¶</a></h3>
<p>This measures and returns values of all of <a class="reference external" href="http://www.fon.hum.uva.nl/praat/manual/Voice_2__Jitter.html">Praat’s jitter algorithms</a>. This can be a bit overwhelming or difficult to understand which measure to use and why, or can lead to multiple colinear comparisons. To address this, by default, Voice Lab returns a the first component from a principal components analysis of those jitter algorithms taken across all selected voices. The underlying reasoning here is that each of these algorithms measures something about how noisy the voice is due to perturbations in period length. The PCA finds what is common about all of these measures of noise, and gives you a score relative to your sample. With a large enough sample, the PCA score should be a more robust measure of jitter than any single measurement. Voice Lab uses use it’s <a class="reference internal" href="#floor-ceiling"><span class="std std-ref">automated pitch floor and ceiling algorithm.</span></a> to set analysis parameters.</p>
<p>Jitter Measures:</p>
<ul class="simple">
<li><p>Jitter (local)</p></li>
<li><p>Jitter (local, absolute)</p></li>
<li><p>Jitter (rap)</p></li>
<li><p>Jitter (ppq5)</p></li>
<li><p>Jitter (ddp)</p></li>
</ul>
<span class="target" id="module-voicelab.src.Voicelab.toolkits.Voicelab.MeasureJitterNode"></span><dl class="py class">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureJitterNode.MeasureJitterNode">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">voicelab.src.Voicelab.toolkits.Voicelab.MeasureJitterNode.</span></span><span class="sig-name descname"><span class="pre">MeasureJitterNode</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureJitterNode.MeasureJitterNode" title="Permalink to this definition">¶</a></dt>
<dd><p>Measure Jitter using each algorithm from Praat. Also provides an option to take a 1-factor PCA of the results.</p>
<section id="id6">
<h4>Arguments:<a class="headerlink" href="#id6" title="Permalink to this heading">¶</a></h4>
<dl>
<dt>self.args: dict</dt><dd><p>Dictionary of arguments to be passed to the node.
self.args[“file_path”]: str, default=0.0</p>
<blockquote>
<div><p>path to the file to be analyzed</p>
</div></blockquote>
<dl class="simple">
<dt>self.args[‘start_time’]: float, default=0.0</dt><dd><p>start time of the analysis</p>
</dd>
<dt>self.args[‘end_time’]: float, default=0.0001</dt><dd><p>end time of the analysis</p>
</dd>
<dt>self.args[‘shortest_period’]: float</dt><dd><p>shortest period to be considered</p>
</dd>
<dt>self.args[‘longest_period’]: float, default=0.02</dt><dd><p>longest period to be considered</p>
</dd>
<dt>self.args[‘maximum_period_factor’]: float, default=1.3</dt><dd><p>the largest possible difference between consecutive intervals that will be used in the computation of jitter</p>
</dd>
</dl>
<p>self.args[‘Measure PCA’]: bool, default=True</p>
</dd>
<dt>self.state: dict</dt><dd><dl class="simple">
<dt>Dictionary of state variables to be passed to the node. This saves the individual jitter measurements from process(), and passes them to end() for PCA.</dt><dd><p>self.state[“local_jitter_list”]: list
self.state[“localabsolute_jitter_list”]: list
self.state[“rap_jitter_list”]: list
self.state[“ppq5_jitter_list”]: list
self.state[“ddp_jitter_list”]: list</p>
</dd>
</dl>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureJitterNode.MeasureJitterNode.end">
<span class="sig-name descname"><span class="pre">end</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">results</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureJitterNode.MeasureJitterNode.end" title="Permalink to this definition">¶</a></dt>
<dd><p>This method calls the jitter_pca method and returns the PCA results to the main program/</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>results</strong> (<em>dict</em>) – dictionary of jitter measurements</p>
</dd>
<dt class="field-even">Return results<span class="colon">:</span></dt>
<dd class="field-even"><p>dictionary of jitter measurements</p>
</dd>
<dt class="field-odd">Rtype results<span class="colon">:</span></dt>
<dd class="field-odd"><p>dict[str, Union[float, int, str]]</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureJitterNode.MeasureJitterNode.jitter_pca">
<span class="sig-name descname"><span class="pre">jitter_pca</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureJitterNode.MeasureJitterNode.jitter_pca" title="Permalink to this definition">¶</a></dt>
<dd><p>perform PCA on the jitter measurements</p>
<p>These arguments are passed into the method by self.
:argument local_jitter_list: list of local jitter measurements
:type local_jitter_list: list
:argument localabsolute_jitter_list: list of local absolute jitter measurements
:type localabsolute_jitter_list: list
:argument rap_jitter_list: list of rap jitter measurements
:type rap_jitter_list: list
:argument ppq5_jitter_list: list of ppq5 jitter measurements
:type ppq5_jitter_list: list
:argument ddp_jitter_list: list of ddp jitter measurements
:type ddp_jitter_list: list</p>
<dl class="field-list simple">
<dt class="field-odd">Return principal_components<span class="colon">:</span></dt>
<dd class="field-odd"><p>list of PCA values or an error message</p>
</dd>
<dt class="field-even">Rtype principal_components<span class="colon">:</span></dt>
<dd class="field-even"><p>Union[list, str]</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureJitterNode.MeasureJitterNode.process">
<span class="sig-name descname"><span class="pre">process</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureJitterNode.MeasureJitterNode.process" title="Permalink to this definition">¶</a></dt>
<dd><p>measure jitter
:argument file_path: path to the file to be analyzed
:type file_path: str</p>
<dl class="field-list simple">
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p>dictionary of jitter measurements</p>
</dd>
</dl>
<p>:rtype <a class="reference external" href="dict:[str">dict:[str</a>, Union[float, int, str]]</p>
</dd></dl>

</section>
</dd></dl>

</section>
<section id="measure-shimmer">
<span id="shimmer"></span><h3>Measure Shimmer<a class="headerlink" href="#measure-shimmer" title="Permalink to this heading">¶</a></h3>
<p>This measures and returns values of all of <a class="reference external" href="http://www.fon.hum.uva.nl/praat/manual/Voice_3__Shimmer.html">Praat’s shimmer algorithms</a>. This can be a bit overwhelming or difficult to understand which measure to use and why, or can lead to multiple colinear comparisons. To address this, by default, Voice Lab returns a the first component from a principal components analysis of those shimmer algorithms taken across all selected voices. The underlying reasoning here is that each of these algorithms measures something about how noisy the voice is due to perturbations in amplitude of periods. The PCA finds what is common about all of these measures of noise, and gives you a score relative to your sample. With a large enough sample, the PCA score should be a more robust measure of shimmer than any single measurement. Voice Lab uses use it’s <a class="reference internal" href="#floor-ceiling"><span class="std std-ref">automated pitch floor and ceiling algorithm.</span></a> to set analysis parameters.</p>
<p>Shimmer Measures:</p>
<ul class="simple">
<li><p>Shimmer (local)</p></li>
<li><p>Shimmer (local, dB)</p></li>
<li><p>Shimmer (apq3)</p></li>
<li><p>Shimmer (aqp5)</p></li>
<li><p>Shimmer (apq11)</p></li>
<li><p>Shimmer (ddp)</p></li>
</ul>
<span class="target" id="module-voicelab.src.Voicelab.toolkits.Voicelab.MeasureShimmerNode"></span><dl class="py class">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureShimmerNode.MeasureShimmerNode">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">voicelab.src.Voicelab.toolkits.Voicelab.MeasureShimmerNode.</span></span><span class="sig-name descname"><span class="pre">MeasureShimmerNode</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureShimmerNode.MeasureShimmerNode" title="Permalink to this definition">¶</a></dt>
<dd><p>Measure Jitter using each algorithm from Praat. Also provides an option to take a 1-factor PCA of the results.</p>
<section id="id7">
<h4>Arguments:<a class="headerlink" href="#id7" title="Permalink to this heading">¶</a></h4>
<dl>
<dt>self.args: dict</dt><dd><p>Dictionary of arguments to be passed to the node.
self.args[“file_path”]: str, default=0.0</p>
<blockquote>
<div><p>path to the file to be analyzed</p>
</div></blockquote>
<dl class="simple">
<dt>self.args[‘start_time’]: float, default=0.0</dt><dd><p>start time of the analysis</p>
</dd>
<dt>self.args[‘end_time’]: float, default=0.0001</dt><dd><p>end time of the analysis</p>
</dd>
<dt>self.args[‘shortest_period’]: float</dt><dd><p>shortest period to be considered</p>
</dd>
<dt>self.args[‘longest_period’]: float, default=0.02</dt><dd><p>longest period to be considered</p>
</dd>
<dt>self.args[‘maximum_period_factor’]: float, default=1.3</dt><dd><p>the largest possible difference between consecutive intervals that will be used in the computation of shimmer</p>
</dd>
<dt>self.args[‘maximum_amplitude’]: float, default=1.6</dt><dd><p>The maximum amplitude factor.  Can’t find anything on this in the Praat Manual
Possibly the largest possible difference between consecutive amplitudes that will be used in the computation of shimmer</p>
</dd>
</dl>
<p>self.args[‘Measure PCA’]: str, default=”Yes”</p>
</dd>
<dt>self.state: dict</dt><dd><dl class="simple">
<dt>Dictionary of state variables to be passed to the node. This saves the individual shimmer measurements from process(), and passes them to end() for PCA.</dt><dd><p>self.state[“local_shimmer_list”]: list
self.state[“localdb_shimmer_list”]: list
self.state[“apq3_shimmer”]: list
self.state[“aqpq5_shimmer”]: list
self.state[“apq11_shimmer”]: list
self.state[“dda_shimmer”]: list</p>
</dd>
</dl>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureShimmerNode.MeasureShimmerNode.end">
<span class="sig-name descname"><span class="pre">end</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">results</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureShimmerNode.MeasureShimmerNode.end" title="Permalink to this definition">¶</a></dt>
<dd><dl class="simple">
<dt>Args:</dt><dd><p>results:</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureShimmerNode.MeasureShimmerNode.process">
<span class="sig-name descname"><span class="pre">process</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureShimmerNode.MeasureShimmerNode.process" title="Permalink to this definition">¶</a></dt>
<dd><p>This function measures Shimmer.</p>
</dd></dl>

</section>
</dd></dl>

</section>
<section id="measure-ltas">
<h3>Measure LTAS<a class="headerlink" href="#measure-ltas" title="Permalink to this heading">¶</a></h3>
<p>This measures several items from the Long-Term Average Spectrum using Praat’s default settings.</p>
<ul class="simple">
<li><p>mean (dB)</p></li>
<li><p>slope (dB)</p></li>
<li><p>local peak height (dB)</p></li>
<li><p>standard deviation (dB)</p></li>
<li><p>spectral tilt slope (dB/Hz)</p></li>
<li><p>spectral tilt intercept (dB)</p></li>
</ul>
<p>You can adjust:
- Pitch correction
- Bandwidth
- Max Frequency
- Shortest and longest periods
- Maximum period factor</p>
<span class="target" id="module-voicelab.src.Voicelab.toolkits.Voicelab.MeasureLTASNode"></span><dl class="py class">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureLTASNode.MeasureLTASNode">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">voicelab.src.Voicelab.toolkits.Voicelab.MeasureLTASNode.</span></span><span class="sig-name descname"><span class="pre">MeasureLTASNode</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureLTASNode.MeasureLTASNode" title="Permalink to this definition">¶</a></dt>
<dd><p>Measure frequency characteristics of a Long-Term Average Spectrum of a voice</p>
<section id="attributes">
<h4>Attributes:<a class="headerlink" href="#attributes" title="Permalink to this heading">¶</a></h4>
<dl>
<dt>self.args: dict</dt><dd><p>A dictionary of settings for the LTAS measurements</p>
<dl class="simple">
<dt>self.args[‘Pitch corrected’]: bool, default=False</dt><dd><p>It tries to compute an Ltas of the spectral envelope of the voiced parts, correcting away the influence of F0 in a way that does not sacrifice frequency selectivity. The resulting Ltas is meant to reflect only the resonances (formants) in the vocal tract and the envelope of the glottal source spectrum. <a class="reference external" href="https://www.fon.hum.uva.nl/praat/manual/Sound__To_Ltas__pitch-corrected____.html">https://www.fon.hum.uva.nl/praat/manual/Sound__To_Ltas__pitch-corrected____.html</a></p>
</dd>
<dt>self.args[‘Bandwidth’]: Union[float, int], default=100.0</dt><dd><p>Frequency bandwidth of LTAS</p>
</dd>
<dt>self.args[‘Maximum frequency’]: Union[float, int], default=5000.0</dt><dd><p>Sound will be resampled to 2x this value for LTAS analysis</p>
</dd>
<dt>self.args[‘Shortest period (s)’]: Union[float, int], default=0.0001</dt><dd><p>The shortest period considered</p>
</dd>
<dt>self.args[‘Longest period (s)’]: Union[float, int], default=0.02</dt><dd><p>The longest period considered</p>
</dd>
<dt>self.args[‘Maximum period factor’]: Union[float, int], default=1.3</dt><dd><p>The longest difference between periods to be considered</p>
</dd>
</dl>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureLTASNode.MeasureLTASNode.process">
<span class="sig-name descname"><span class="pre">process</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureLTASNode.MeasureLTASNode.process" title="Permalink to this definition">¶</a></dt>
<dd><p>Run LTAS node on a sound</p>
<section id="id8">
<h5>Returns:<a class="headerlink" href="#id8" title="Permalink to this heading">¶</a></h5>
<dl class="simple">
<dt>dict[str | Union[float, int, str]</dt><dd><p>Dictionary of following results or dict of error message</p>
<ul class="simple">
<li><p>“LTAS Mean (dB)”: mean_dB,</p></li>
<li><p>“LTAS slope (dB)”: slope_dB,</p></li>
<li><p>“LTAS local peak height (dB)”: local_peak_height_dB,</p></li>
<li><p>“LTAS standard deviation (dB)”: standard_deviation_dB,</p></li>
<li><p>“LTAS spectral tilt slope ({slope_unit})”: slope_value,</p></li>
<li><p>“LTAS spectral tilt intercept ({intercept_unit})”: intercept_value,</p></li>
</ul>
</dd>
</dl>
</section>
</dd></dl>

</section>
</dd></dl>

</section>
<section id="measure-mfcc">
<h3>Measure MFCC<a class="headerlink" href="#measure-mfcc" title="Permalink to this heading">¶</a></h3>
<p>This node measures the first 24 Mel Cepstral Coeffecients of the sound.  There are no options to set. If you want fewer coeffecients, you can delete the one’s you don’t want. If you need the same number of values for each sound for Machine Learning, make sure the sounds are the same length before running the analysis.</p>
<span class="target" id="module-voicelab.src.Voicelab.toolkits.Voicelab.MeasureMFCCNode"></span><dl class="py class">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureMFCCNode.MeasureMFCCNode">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">voicelab.src.Voicelab.toolkits.Voicelab.MeasureMFCCNode.</span></span><span class="sig-name descname"><span class="pre">MeasureMFCCNode</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureMFCCNode.MeasureMFCCNode" title="Permalink to this definition">¶</a></dt>
<dd><p>Measure 24 MFCCs of a sound</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>self.args</strong><strong>[</strong><strong>'file_path'</strong><strong>]</strong> (<em>str</em>) – the path to the file to be analysed</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>dict of results</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>dict[str, Union[int, float, str, list]]</p>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureMFCCNode.MeasureMFCCNode.process">
<span class="sig-name descname"><span class="pre">process</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureMFCCNode.MeasureMFCCNode.process" title="Permalink to this definition">¶</a></dt>
<dd><p>Run the MFCC analysis</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>self.args</strong><strong>[</strong><strong>'file_path'</strong><strong>]</strong> (<em>str</em>) – the path to the file to be analysed</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>dict of results</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>dict[str, Union[int, float, str, list]]</p>
</dd>
</dl>
</dd></dl>

</dd></dl>

</section>
<section id="measure-spectral-shape">
<h3>Measure Spectral Shape<a class="headerlink" href="#measure-spectral-shape" title="Permalink to this heading">¶</a></h3>
<p>This measures spectral:
- Centre of Gravity
- Standard Deviation
- Kurtosis
- Band Energy Difference
- Band Density Difference</p>
<span class="target" id="module-voicelab.src.Voicelab.toolkits.Voicelab.MeasureSpectralShapeNode"></span><dl class="py class">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureSpectralShapeNode.MeasureSpectralShapeNode">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">voicelab.src.Voicelab.toolkits.Voicelab.MeasureSpectralShapeNode.</span></span><span class="sig-name descname"><span class="pre">MeasureSpectralShapeNode</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureSpectralShapeNode.MeasureSpectralShapeNode" title="Permalink to this definition">¶</a></dt>
<dd><p>Measure characteristics of the spectral shape</p>
<section id="id9">
<h4>Arguments<a class="headerlink" href="#id9" title="Permalink to this heading">¶</a></h4>
<dl>
<dt>self.args: dict</dt><dd><p>A dictionary of options for the node</p>
<blockquote>
<div><p>self.args[“Low band floor (Hz)”]: Union[float, int], default=0.0</p>
<p>self.args[“Low band ceiling (Hz)”]: Union[float, int], default=500.0</p>
<p>self.args[“High band floor (Hz)”]: Union[float, int], default=500.0</p>
<p>self.args[“High band ceiling (Hz)”]: Union[float, int], default=4000.0</p>
<p>self.args[“Power”]: 2 int, default=2</p>
</div></blockquote>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureSpectralShapeNode.MeasureSpectralShapeNode.process">
<span class="sig-name descname"><span class="pre">process</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureSpectralShapeNode.MeasureSpectralShapeNode.process" title="Permalink to this definition">¶</a></dt>
<dd><p>Run the Spectral Shape Node</p>
<section id="id10">
<h5>Returns:<a class="headerlink" href="#id10" title="Permalink to this heading">¶</a></h5>
<dl class="simple">
<dt>dict of str | Union[float, str]</dt><dd><dl class="simple">
<dt>dictionary with the following keys:</dt><dd><ul class="simple">
<li><p>“Centre of Gravity”: centre_of_gravity,</p></li>
<li><p>“Standard Deviation”: standard_deviation,</p></li>
<li><p>“Kurtosis”: kurtosis,</p></li>
<li><p>“Skewness”: skewness,</p></li>
<li><p>“Band Energy Difference”: band_energy_difference,</p></li>
<li><p>“Band Density Difference”: band_density_difference,</p></li>
</ul>
</dd>
</dl>
</dd>
</dl>
</section>
</dd></dl>

</section>
</dd></dl>

</section>
<section id="measure-spectral-tilt">
<h3>Measure Spectral Tilt<a class="headerlink" href="#measure-spectral-tilt" title="Permalink to this heading">¶</a></h3>
<p>This measures spectral tilt by returning the slope of a regression between freqeuncy and amplitude of each sound. This is from a script written by Michael J. Owren, with sorting errors corrected. This is not the same equation in Voice Sauce.</p>
<p>Owren, M.J. GSU Praat Tools: Scripts for modifying and analyzing sounds using Praat acoustics software. Behavior Research Methods (2008) 40:  822–829. <a class="reference external" href="https://doi.org/10.3758/BRM.40.3.822">https://doi.org/10.3758/BRM.40.3.822</a></p>
<span class="target" id="module-voicelab.src.Voicelab.toolkits.Voicelab.MeasureSpectralTiltNode"></span><dl class="py class">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureSpectralTiltNode.MeasureSpectralTiltNode">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">voicelab.src.Voicelab.toolkits.Voicelab.MeasureSpectralTiltNode.</span></span><span class="sig-name descname"><span class="pre">MeasureSpectralTiltNode</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureSpectralTiltNode.MeasureSpectralTiltNode" title="Permalink to this definition">¶</a></dt>
<dd><p>Measure Spectral Tilt by returning the slope of zero-intercept linear regression of the power spectrum.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>window_length_in_millisecs</strong> (<em>str</em>) – Window length in milliseconds</p>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureSpectralTiltNode.MeasureSpectralTiltNode.process">
<span class="sig-name descname"><span class="pre">process</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureSpectralTiltNode.MeasureSpectralTiltNode.process" title="Permalink to this definition">¶</a></dt>
<dd><p>run the Spectral tilt measurement</p>
<dl class="field-list simple">
<dt class="field-odd">Return {“Spectral Tilt”<span class="colon">:</span></dt>
<dd class="field-odd"><p>spectral_tilt}</p>
</dd>
</dl>
<p>:rtype dict[str|Union[float, str]]</p>
</dd></dl>

</dd></dl>

</section>
<section id="measure-speech-rate">
<h3>Measure Speech Rate<a class="headerlink" href="#measure-speech-rate" title="Permalink to this heading">¶</a></h3>
<p>This function is an implementation of the Praat script published here:
De Jong, N.H. &amp; Wempe, T. (2009). Praat script to detect syllable nuclei and measure speech rate automatically. Behavior research methods, 41 (2), 385 - 390.</p>
<p>Voice Lab used version 2 of the script, available <a class="reference external" href="https://sites.google.com/site/speechrate/Home/praat-script-syllable-nuclei-v2">here</a>.</p>
<dl class="simple">
<dt>This returns:</dt><dd><ul class="simple">
<li><p>Number of Syllables</p></li>
<li><p>Number of Pauses</p></li>
<li><p>Duration(s)</p></li>
<li><p>Phonation Time(s)</p></li>
<li><p>Speech Rate (Number of Syllables / Duration)</p></li>
<li><p>Articulation Rate (Number of Syllables / Phonation Time)</p></li>
<li><p>Average Syllable Duration (Speaking Time / Number of Syllables)</p></li>
</ul>
</dd>
</dl>
<p>You can adjust:
- silence threshold <code class="code highlight python docutils literal highlight-python"><span class="n">mindb</span></code></p>
<ul class="simple">
<li><p>mimimum dip between peaks (dB) <code class="code highlight python docutils literal highlight-python"><span class="n">mindip</span></code>. This should be between 2-4. Try 4 for clean and filtered sounds, and lower numbers for noisier sounds.</p></li>
<li><p>minimum pause length <code class="code highlight python docutils literal highlight-python"><span class="n">minpause</span></code></p></li>
</ul>
<p>This command really only words on sounds with a few syllables, since Voice Lab is measuring how fast someone speaks. For monosyllabic sounds, use the <a class="reference internal" href="#duration"><span class="std std-ref">Measure Duration function.</span></a></p>
<span class="target" id="module-voicelab.src.Voicelab.toolkits.Voicelab.MeasureSpeechRateNode"></span><dl class="py class">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureSpeechRateNode.MeasureSpeechRateNode">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">voicelab.src.Voicelab.toolkits.Voicelab.MeasureSpeechRateNode.</span></span><span class="sig-name descname"><span class="pre">MeasureSpeechRateNode</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureSpeechRateNode.MeasureSpeechRateNode" title="Permalink to this definition">¶</a></dt>
<dd><p>Measure Speech Rate using the script found <a class="reference external" href="https://sites.google.com/site/speechrate/Home/praat-script-syllable-nuclei-v2">here</a>.</p>
<section id="id12">
<h4>Arguments<a class="headerlink" href="#id12" title="Permalink to this heading">¶</a></h4>
<dl>
<dt>self.args: dict</dt><dd><p>Dictionary of values passed into the node.</p>
<dl class="simple">
<dt>self.args[‘silencedb’]: Union[float, int]</dt><dd><p>The threshold for silence. Decibels are relative to 90.9691 dB, so we use negative dB values.</p>
</dd>
<dt>self.args[‘mindib’]: Union[float, int]</dt><dd><p>The minimum dip between peaks</p>
</dd>
<dt>self.args[‘minpause’]: Union[float, int]</dt><dd><p>The minimum pause duration</p>
</dd>
</dl>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.MeasureSpeechRateNode.MeasureSpeechRateNode.process">
<span class="sig-name descname"><span class="pre">process</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.MeasureSpeechRateNode.MeasureSpeechRateNode.process" title="Permalink to this definition">¶</a></dt>
<dd><p>Measure speechrate.</p>
<section id="id13">
<h5>Returns<a class="headerlink" href="#id13" title="Permalink to this heading">¶</a></h5>
<p>A dictionary with the following keys (or an error message):</p>
<blockquote>
<div><ul class="simple">
<li><dl class="simple">
<dt>“Number of Syllables”: voicedcount</dt><dd><p>str | Union[float, int, str]</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>“Number of Pauses”: npause</dt><dd><p>str | Union[float, int, str]</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>“Duratrion(s)”: originaldur</dt><dd><p>str | Union[float, int, str]</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>“Phonation Time(s)”: intensity_duration</dt><dd><p>str | Union[float, int, str]</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>“speechrate(Number of Syllables / Duration)”: speakingrate</dt><dd><p>str | Union[float, int, str]</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>“Articulation Rate(Number of Syllables / phonationtime)”: articulationrate,</dt><dd><p>str | Union[float, int, str]</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>“ASD(Speaking Time / Number of Syllables)”: asd</dt><dd><p>str | Union[float, int, str]</p>
</dd>
</dl>
</li>
</ul>
</div></blockquote>
</section>
</dd></dl>

</section>
</dd></dl>

</section>
</section>
<section id="manipulation-nodes">
<h2>Manipulation Nodes<a class="headerlink" href="#manipulation-nodes" title="Permalink to this heading">¶</a></h2>
<section id="lower-pitch">
<h3>Lower Pitch<a class="headerlink" href="#lower-pitch" title="Permalink to this heading">¶</a></h3>
<p>This lowers pitch using the PSOLA method. By default, this lowers  by 0.5 ERBs (Equivalent Rectangular Bandwidths) which is about 20 Hz at a 120 Hz pitch centre and about -/+ 25 Hz at a 240 Hz pitch centre. By default VoiceLab also normalizes intensity to 70 dB RMS, but you can turn this off by deselecting the box in the Settings tab.</p>
<span class="target" id="module-voicelab.src.Voicelab.toolkits.Voicelab.ManipulatePitchLowerNode"></span><dl class="py class">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.ManipulatePitchLowerNode.ManipulatePitchLowerNode">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">voicelab.src.Voicelab.toolkits.Voicelab.ManipulatePitchLowerNode.</span></span><span class="sig-name descname"><span class="pre">ManipulatePitchLowerNode</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.ManipulatePitchLowerNode.ManipulatePitchLowerNode" title="Permalink to this definition">¶</a></dt>
<dd><p>This node manipulates the pitch of the sound by raising it.</p>
<dl class="py attribute">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.ManipulatePitchLowerNode.ManipulatePitchLowerNode.args">
<span class="sig-name descname"><span class="pre">args</span></span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.ManipulatePitchLowerNode.ManipulatePitchLowerNode.args" title="Permalink to this definition">¶</a></dt>
<dd><p>The args dictionary is used to store the arguments of the node.
The keys are the names of the arguments and the values are a tuple of the following format:
(default value, [list of possible values]).</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>unit</strong> (<em>str</em>) – The unit of the pitch. Possible values are: “ERB”, “Hertz”, “mel”, “logHertz”, “semitones”.</p></li>
<li><p><strong>method</strong> (<em>str</em>) – The method of manipulating the pitch. Possible values are: “Shift frequencies”, “Multiply frequencies”. If the method is “Shift frequencies”, the amount is in Hertz. If the methods is “Multiply frequencies”, the amount is a proportion.</p></li>
<li><p><strong>amount</strong> (<em>float</em>) – The amount of the pitch manipulation. This should be a negative number. If you want to raise pitch, use that node instead.</p></li>
<li><p><strong>time_step</strong> (<em>float</em>) – The time step of the pitch manipulation.</p></li>
<li><p><strong>amplitude</strong> (<em>normalize</em>) – Whether to normalize the amplitude of the pitch manipulation.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.ManipulatePitchLowerNode.ManipulatePitchLowerNode.process">
<span class="sig-name descname"><span class="pre">process</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.ManipulatePitchLowerNode.ManipulatePitchLowerNode.process" title="Permalink to this definition">¶</a></dt>
<dd><p>The process function is the heart of the program.  It is called by default when you run a sound through
VoiceLab, and it is also called when you click on “Start queue” in the GUI.  The process function takes in an
array of arguments that are specified by whatever options you check off on the GUI or in VoiceLab’s “Manipulate
Pitch Higher” menu. These arguments are added to the args dictionary in the __init__ function.  The process
function returns a dictionary of the results of the manipulation. This is either a parselmouth Sound object, or
an error message.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>self</strong> – Used to Access the attributes and methods of the class in python.</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>A dictionary with the manipulated parselmouth.Sound object.</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>dict[str, Union[parselmouth.Sound, str]]</p>
</dd>
</dl>
</dd></dl>

</dd></dl>

</section>
<section id="raise-pitch">
<h3>Raise Pitch<a class="headerlink" href="#raise-pitch" title="Permalink to this heading">¶</a></h3>
<p>This raises pitch using the PSOLA method. By default, this lowers  by 0.5 ERBs (Equivalent Rectangular Bandwidths) which is about 20 Hz at a 120 Hz pitch centre and about -/+ 25 Hz at a 240 Hz pitch centre. By default VoiceLab also normalizes intensity to 70 dB RMS, but you can turn this off by deselecting the box in the Settings tab.</p>
<span class="target" id="module-voicelab.src.Voicelab.toolkits.Voicelab.ManipulatePitchHigherNode"></span><dl class="py class">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.ManipulatePitchHigherNode.ManipulatePitchHigherNode">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">voicelab.src.Voicelab.toolkits.Voicelab.ManipulatePitchHigherNode.</span></span><span class="sig-name descname"><span class="pre">ManipulatePitchHigherNode</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.ManipulatePitchHigherNode.ManipulatePitchHigherNode" title="Permalink to this definition">¶</a></dt>
<dd><p>Manipulate pitch higher node.</p>
<dl class="py attribute">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.ManipulatePitchHigherNode.ManipulatePitchHigherNode.args">
<span class="sig-name descname"><span class="pre">args</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">dict</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">list</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">bool</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></em><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.ManipulatePitchHigherNode.ManipulatePitchHigherNode.args" title="Permalink to this definition">¶</a></dt>
<dd><p>The args dictionary is used to store the arguments of the node.
The keys are the names of the arguments and the values are a tuple of the following format:
(default value, [list of possible values]).</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>unit</strong> (<em>str</em>) – The unit of the pitch.</p></li>
<li><p><strong>method</strong> (<em>str</em>) – The method of manipulating the pitch.</p></li>
<li><p><strong>amount</strong> (<em>float</em>) – The amount of the pitch manipulation.</p></li>
<li><p><strong>time_step</strong> (<em>float</em>) – The time step of the pitch manipulation.</p></li>
<li><p><strong>amplitude</strong> (<em>normalize</em>) – Whether to normalize the amplitude of the pitch manipulation.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.ManipulatePitchHigherNode.ManipulatePitchHigherNode.process">
<span class="sig-name descname"><span class="pre">process</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">dict</span><span class="p"><span class="pre">[</span></span><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">parselmouth.Sound</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.ManipulatePitchHigherNode.ManipulatePitchHigherNode.process" title="Permalink to this definition">¶</a></dt>
<dd><p>The process function is the heart of the program.  It is called by default when you run a sound through
VoiceLab, and it is also called when you click on “Start queue” in the GUI.  The process function takes in an
array of arguments that are specified by whatever options you check off on the GUI or in VoiceLab’s “Manipulate
Pitch Higher” menu. These arguments are added to the args dictionary in the __init__ function.  The process
function returns a dictionary of the results of the manipulation. This is either a parselmouth Sound object, or
an error message.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>self</strong> – Used to Access the attributes and methods of the class in python.</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>A dictionary with the manipulated parselmouth.Sound object.</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>dict[str, Union[parselmouth.Sound, str]]</p>
</dd>
</dl>
</dd></dl>

</dd></dl>

</section>
<section id="lower-formants">
<h3>Lower Formants<a class="headerlink" href="#lower-formants" title="Permalink to this heading">¶</a></h3>
<p>This lowers formants using Praat’s Change Gender Function. By default, Formants are lowered by 15%. This manipulation resamples a sound by the Formant scaling factor (which can be altered in the Settings tab). Then, the sampling rate is overriden to the sound’s original sampling rate. Then PSOLA is employed to stretch time and pitch back (separately) into their original values. By default VoiceLab also normalizes intensity to 70 dB RMS, but you can turn this off by deselecting the box in the Settings tab.</p>
<span class="target" id="module-voicelab.src.Voicelab.toolkits.Voicelab.ManipulateLowerFormantsNode"></span><dl class="py class">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.ManipulateLowerFormantsNode.ManipulateLowerFormantsNode">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">voicelab.src.Voicelab.toolkits.Voicelab.ManipulateLowerFormantsNode.</span></span><span class="sig-name descname"><span class="pre">ManipulateLowerFormantsNode</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.ManipulateLowerFormantsNode.ManipulateLowerFormantsNode" title="Permalink to this definition">¶</a></dt>
<dd><p>Manipulate all of the formants of a voice to be lower.</p>
<section id="id14">
<h4>Attributes:<a class="headerlink" href="#id14" title="Permalink to this heading">¶</a></h4>
<dl>
<dt>self.args: dict</dt><dd><p>Dictionary of arguments for the node.</p>
<dl class="simple">
<dt>self.args{‘formant_shift_ratio’} (float, default=0.85):</dt><dd><p>The amount of formant shift to apply. 0-1 than one makes lower formants.  Greater than 1 makes higher formants.
It’s recommended to use a number between 0 and 1, and if you want to raise formants, use the raise formants node instead to avoid confusion.</p>
</dd>
<dt>self.args{‘normalize amplitude’} (bool, default=True):</dt><dd><p>If true, the amplitude of the manipulated voice will be normalized to 70dB RMS.  Default is True.</p>
</dd>
</dl>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.ManipulateLowerFormantsNode.ManipulateLowerFormantsNode.process">
<span class="sig-name descname"><span class="pre">process</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">dict</span><span class="p"><span class="pre">[</span></span><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">parselmouth.Sound</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.ManipulateLowerFormantsNode.ManipulateLowerFormantsNode.process" title="Permalink to this definition">¶</a></dt>
<dd><p>Lower all formants of the voice.</p>
<section id="id15">
<h5>Attributes:<a class="headerlink" href="#id15" title="Permalink to this heading">¶</a></h5>
<blockquote>
<div><dl class="simple">
<dt>self.args{‘formant_shift_ratio’} (float, default=0.85):</dt><dd><p>The amount of formant shift to apply. 0-1 than one makes lower formants.  Greater than 1 makes higher formants.
It’s recommended to use a number between 0 and 1, and if you want to raise formants, use the raise formants node instead to avoid confusion.</p>
</dd>
</dl>
<p>self.args{‘formant_shift_ratio’} (float, default=0.85):</p>
</div></blockquote>
<dl class="field-list simple">
<dt class="field-odd">return<span class="colon">:</span></dt>
<dd class="field-odd"><p>Manipulated parselmouth.Sound object.</p>
</dd>
<dt class="field-even">rtype<span class="colon">:</span></dt>
<dd class="field-even"><p>manipulated_voice: parselmouth.Sound</p>
</dd>
</dl>
</section>
</dd></dl>

</section>
</dd></dl>

</section>
<section id="raise-formants">
<h3>Raise Formants<a class="headerlink" href="#raise-formants" title="Permalink to this heading">¶</a></h3>
<p>This raises formants using Praat’s Change Gender Function. By default, Formants are raised by 15%. This manipulation resamples a sound by the Formant scaling factor (which can be altered in the Settings tab). Then, the sampling rate is overriden to the sound’s original sampling rate. Then PSOLA is employed to stretch time and pitch back (separately) into their original values. By default VoiceLab also normalizes intensity to 70 dB RMS, but you can turn this off by deselecting the box in the Settings tab.</p>
<span class="target" id="module-voicelab.src.Voicelab.toolkits.Voicelab.ManipulateRaiseFormantsNode"></span><dl class="py class">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.ManipulateRaiseFormantsNode.ManipulateRaiseFormantsNode">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">voicelab.src.Voicelab.toolkits.Voicelab.ManipulateRaiseFormantsNode.</span></span><span class="sig-name descname"><span class="pre">ManipulateRaiseFormantsNode</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.ManipulateRaiseFormantsNode.ManipulateRaiseFormantsNode" title="Permalink to this definition">¶</a></dt>
<dd><p>Manipulate all of the formants of a voice to be lower.</p>
<section id="id16">
<h4>Attributes:<a class="headerlink" href="#id16" title="Permalink to this heading">¶</a></h4>
<dl>
<dt>self.args: dict</dt><dd><p>Dictionary of arguments for the node.</p>
<dl class="simple">
<dt>self.args{‘formant_shift_ratio’} (float, default=1.15):</dt><dd><p>The amount of formant shift to apply. &gt;1 makes higher formants.  Less than 1 makes lower formants.
It’s recommended to use a number &gt; 1, and if you want to lower formants, use the lower formants node instead to avoid confusion.</p>
</dd>
<dt>self.args{‘normalize amplitude’} (bool, default=True):</dt><dd><p>If true, the amplitude of the manipulated voice will be normalized to 70dB RMS.  Default is True.</p>
</dd>
</dl>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.ManipulateRaiseFormantsNode.ManipulateRaiseFormantsNode.process">
<span class="sig-name descname"><span class="pre">process</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">dict</span><span class="p"><span class="pre">[</span></span><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">parselmouth.Sound</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.ManipulateRaiseFormantsNode.ManipulateRaiseFormantsNode.process" title="Permalink to this definition">¶</a></dt>
<dd><p>Raise all formants of the voice.</p>
<section id="id17">
<h5>Attributes:<a class="headerlink" href="#id17" title="Permalink to this heading">¶</a></h5>
<blockquote>
<div><dl class="simple">
<dt>self.args{‘formant_shift_ratio’} (float, default=0.1.15):</dt><dd><p>The amount of formant shift to apply. 0-1 than one makes lower formants.  Greater than 1 makes higher formants.
It’s recommended to use a number between 0 and 1, and if you want to raise formants, use the raise formants node instead to avoid confusion.</p>
</dd>
<dt>self.args{‘normalize amplitude’} (bool, default=True):</dt><dd><p>If true, the amplitude of the manipulated voice will be normalized to 70dB RMS.  Default is True.</p>
</dd>
</dl>
</div></blockquote>
<dl class="field-list simple">
<dt class="field-odd">return<span class="colon">:</span></dt>
<dd class="field-odd"><p>Manipulated parselmouth.Sound object.</p>
</dd>
<dt class="field-even">rtype<span class="colon">:</span></dt>
<dd class="field-even"><p>manipulated_voice: parselmouth.Sound</p>
</dd>
</dl>
</section>
</dd></dl>

</section>
</dd></dl>

</section>
<section id="lower-pitch-and-formants">
<h3>Lower Pitch and Formants<a class="headerlink" href="#lower-pitch-and-formants" title="Permalink to this heading">¶</a></h3>
<p>This manipulation lowers both pitch and formants in the same direction by the same or independent amounts. This uses the algorithm described in Manipulate Formants, but allows the user to scale or shift pitch to a designated degree. By default, pitch is also lowered by 15%. By default VoiceLab also normalizes intensity to 70 dB RMS, but you can turn this off by deselecting the box in the Settings tab.</p>
<span class="target" id="module-voicelab.src.Voicelab.toolkits.Voicelab.ManipulateLowerPitchAndFormantsNode"></span><dl class="py class">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.ManipulateLowerPitchAndFormantsNode.ManipulateLowerPitchAndFormantsNode">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">voicelab.src.Voicelab.toolkits.Voicelab.ManipulateLowerPitchAndFormantsNode.</span></span><span class="sig-name descname"><span class="pre">ManipulateLowerPitchAndFormantsNode</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.ManipulateLowerPitchAndFormantsNode.ManipulateLowerPitchAndFormantsNode" title="Permalink to this definition">¶</a></dt>
<dd><p>Manipulate lower pitch and formants</p>
<section id="id18">
<h4>Arguments<a class="headerlink" href="#id18" title="Permalink to this heading">¶</a></h4>
<dl>
<dt>self.args<span class="classifier">dict</span></dt><dd><p>Arguments for the node
self.args[‘formant_factor’] : float, default=0.85</p>
<blockquote>
<div><p>Factor to multiply formants by. Use a nunber between 0 and 1. For higher values, use ManipulateHigherPitchAndFormantsNode</p>
</div></blockquote>
<dl class="simple">
<dt>self.args[‘pitch_factor’]<span class="classifier">float</span></dt><dd><p>Factor to multiply pitch by</p>
</dd>
<dt>self.args[‘normalize amplitude’]<span class="classifier">bool, default=True</span></dt><dd><p>Normalize amplitude to 70 dB RMS</p>
</dd>
</dl>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.ManipulateLowerPitchAndFormantsNode.ManipulateLowerPitchAndFormantsNode.process">
<span class="sig-name descname"><span class="pre">process</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">dict</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">parselmouth.Sound</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.ManipulateLowerPitchAndFormantsNode.ManipulateLowerPitchAndFormantsNode.process" title="Permalink to this definition">¶</a></dt>
<dd><p>Lower pitch and formants</p>
<dl class="field-list simple">
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p>Dictionary of manipulated sound</p>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p>dict of [str, parselmouth.Sound]</p>
</dd>
</dl>
</dd></dl>

</section>
</dd></dl>

</section>
<section id="raise-pitch-and-formants">
<h3>Raise Pitch and Formants<a class="headerlink" href="#raise-pitch-and-formants" title="Permalink to this heading">¶</a></h3>
<p>This manipulation raises both pitch and formants in the same direction by the same or independent amounts. This uses the algorithm described in Manipulate Formants, but allows the user to scale or shift pitch to a designated degree. By default, pitch is also raised by 15%. By default VoiceLab also normalizes intensity to 70 dB RMS, but you can turn this off by deselecting the box in the Settings tab.</p>
<span class="target" id="module-voicelab.src.Voicelab.toolkits.Voicelab.ManipulateRaisePitchAndFormantsNode"></span><dl class="py class">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.ManipulateRaisePitchAndFormantsNode.ManipulateRaisePitchAndFormantsNode">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">voicelab.src.Voicelab.toolkits.Voicelab.ManipulateRaisePitchAndFormantsNode.</span></span><span class="sig-name descname"><span class="pre">ManipulateRaisePitchAndFormantsNode</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.ManipulateRaisePitchAndFormantsNode.ManipulateRaisePitchAndFormantsNode" title="Permalink to this definition">¶</a></dt>
<dd><p>Manipulate raise pitch and formants</p>
<section id="id19">
<h4>Arguments<a class="headerlink" href="#id19" title="Permalink to this heading">¶</a></h4>
<dl>
<dt>self.args<span class="classifier">dict</span></dt><dd><p>Arguments for the node
self.args[‘formant_factor’] : float, default=1.15</p>
<blockquote>
<div><p>Factor to multiply formants by. Use a number &gt;1. For lower values, use ManipulateLowerPitchAndFormantsNode</p>
</div></blockquote>
<dl class="simple">
<dt>self.args[‘pitch_factor’]<span class="classifier">float</span></dt><dd><p>Factor to multiply pitch by</p>
</dd>
<dt>self.args[‘normalize amplitude’]<span class="classifier">bool, default=True</span></dt><dd><p>Normalize amplitude to 70 dB RMS</p>
</dd>
</dl>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.ManipulateRaisePitchAndFormantsNode.ManipulateRaisePitchAndFormantsNode.process">
<span class="sig-name descname"><span class="pre">process</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">dict</span><span class="p"><span class="pre">[</span></span><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">parselmouth.Sound</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.ManipulateRaisePitchAndFormantsNode.ManipulateRaisePitchAndFormantsNode.process" title="Permalink to this definition">¶</a></dt>
<dd><p>Raise pitch and formants</p>
<dl class="field-list simple">
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p>Dictionary of manipulated sound</p>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p>dict of [str, parselmouth.Sound]</p>
</dd>
</dl>
</dd></dl>

</section>
</dd></dl>

</section>
<section id="reverse-sounds">
<h3>Reverse Sounds<a class="headerlink" href="#reverse-sounds" title="Permalink to this heading">¶</a></h3>
<p>This reverses the selected sounds. Use this if you want to play sounds backwards. Try a Led Zepplin or Beatles song.</p>
<span class="target" id="module-voicelab.src.Voicelab.toolkits.Voicelab.ReverseSoundsNode"></span><dl class="py class">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.ReverseSoundsNode.ReverseSoundsNode">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">voicelab.src.Voicelab.toolkits.Voicelab.ReverseSoundsNode.</span></span><span class="sig-name descname"><span class="pre">ReverseSoundsNode</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.ReverseSoundsNode.ReverseSoundsNode" title="Permalink to this definition">¶</a></dt>
<dd><p>A Class to reverse voice file temporally.</p>
<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.ReverseSoundsNode.ReverseSoundsNode.process">
<span class="sig-name descname"><span class="pre">process</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">dict</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">parselmouth.Sound</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">str</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.ReverseSoundsNode.ReverseSoundsNode.process" title="Permalink to this definition">¶</a></dt>
<dd><p>Run the node
Reverse the time of the voice file.</p>
<blockquote>
<div><dl class="field-list simple">
<dt class="field-odd">return<span class="colon">:</span></dt>
<dd class="field-odd"><p>The reversed sound file or an error message</p>
</dd>
<dt class="field-even">rtype<span class="colon">:</span></dt>
<dd class="field-even"><p>dict of {str, [parselmouth.Sound, str]}</p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

</dd></dl>

</section>
<section id="resample-sounds">
<h3>Resample Sounds<a class="headerlink" href="#resample-sounds" title="Permalink to this heading">¶</a></h3>
<p>This is a quick and easy way to batch process resampling sounds. 44.1kHz is the default. Change this value in the Settings tab.</p>
<span class="target" id="module-voicelab.src.Voicelab.toolkits.Voicelab.ResampleSoundsNode"></span><dl class="py class">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.ResampleSoundsNode.ResampleSoundsNode">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">voicelab.src.Voicelab.toolkits.Voicelab.ResampleSoundsNode.</span></span><span class="sig-name descname"><span class="pre">ResampleSoundsNode</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.ResampleSoundsNode.ResampleSoundsNode" title="Permalink to this definition">¶</a></dt>
<dd><section id="id20">
<h4>Attributes<a class="headerlink" href="#id20" title="Permalink to this heading">¶</a></h4>
<dl class="simple">
<dt>self.args: dict</dt><dd><p>Dictionary of parameters to pass into the node.</p>
</dd>
<dt>self.args[‘Sampling Rate’]: Union[float, int], default = 44100.0</dt><dd><p>The target sampling rate.</p>
</dd>
<dt>self.args[‘Precision’]: Union[float, int], default=50</dt><dd><ul class="simple">
<li><p>If Precision is 1, the method is linear interpolation, which is inaccurate but fast.</p></li>
<li><p>If Precision is greater than 1, the method is sin(x)/x (“sinc”) interpolation, with a depth equal to Precision. For higher Precision, the algorithm is slower but more accurate.</p></li>
<li><p>If Sampling frequency is less than the sampling frequency of the selected sound, an anti-aliasing low-pass filtering is performed prior to resampling.</p></li>
<li><p><a class="reference external" href="https://www.fon.hum.uva.nl/praat/manual/Sound__Resample___.html">https://www.fon.hum.uva.nl/praat/manual/Sound__Resample___.html</a></p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.ResampleSoundsNode.ResampleSoundsNode.process">
<span class="sig-name descname"><span class="pre">process</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.ResampleSoundsNode.ResampleSoundsNode.process" title="Permalink to this definition">¶</a></dt>
<dd><p>Resample sounds. This returns a parselmouth.Sound object which is saved later by the Voicelab interface.</p>
<p>:return : dictionary with note of success and the resampled parselmouth.Sound object
:rtype: dict{</p>
<blockquote>
<div><p>str|str,
str|Union[parselmouth.Sound, str]
}</p>
</div></blockquote>
</dd></dl>

</section>
</dd></dl>

</section>
<section id="rotate-spectrum">
<h3>Rotate Spectrum<a class="headerlink" href="#rotate-spectrum" title="Permalink to this heading">¶</a></h3>
<p>This resamples the sound, rotates the selected sounds by 180 degrees and reverses it so it’s just the inverted frequency spectrum.
This script is from Chris Darwin and reproduced here with permission: <a class="reference external" href="http://www.lifesci.sussex.ac.uk/home/Chris_Darwin/Praatscripts/Spectral%20Rotation">The original script can be found here</a>.</p>
<p>A similar technique was used here: Bédard, C., &amp; Belin, P. (2004). A “voice inversion effect?”. Brain and cognition, 55(2), 247-249.</p>
<span class="target" id="module-voicelab.src.Voicelab.toolkits.Voicelab.RotateSpectrumNode"></span><dl class="py class">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.RotateSpectrumNode.RotateSpectrumNode">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">voicelab.src.Voicelab.toolkits.Voicelab.RotateSpectrumNode.</span></span><span class="sig-name descname"><span class="pre">RotateSpectrumNode</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.RotateSpectrumNode.RotateSpectrumNode" title="Permalink to this definition">¶</a></dt>
<dd><p>A Class to rotate the spectrum of the voice file.</p>
<p>Script by Chris Darwin: <a class="reference external" href="http://www.lifesci.sussex.ac.uk/home/Chris_Darwin/Praatscripts/Spectral%20Rotation">http://www.lifesci.sussex.ac.uk/home/Chris_Darwin/Praatscripts/Spectral%20Rotation</a></p>
<blockquote>
<div><dl>
<dt>self.args: dict</dt><dd><p>Dictionary of arguments for the node.</p>
<dl class="simple">
<dt>self.args{‘maximum_frequency’} (float):</dt><dd><p>maximum frequency. Spectrum will be resampled to 2x this frequency.
Once rotated, this will be the new minimum frequency, but set to 0.</p>
</dd>
</dl>
</dd>
</dl>
<dl class="simple">
<dt>self.process():</dt><dd><p>Rotates the spectrum of the voice file.</p>
</dd>
</dl>
</div></blockquote>
<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.RotateSpectrumNode.RotateSpectrumNode.process">
<span class="sig-name descname"><span class="pre">process</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">dict</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Union</span><span class="p"><span class="pre">[</span></span><span class="pre">parselmouth.Sound</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">str</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.RotateSpectrumNode.RotateSpectrumNode.process" title="Permalink to this definition">¶</a></dt>
<dd><p>process: WARIO hook called once for each voice file.</p>
<blockquote>
<div><p>Rotate the spectrum of the voice file.
Script by Chris Darwin: <a class="reference external" href="http://www.lifesci.sussex.ac.uk/home/Chris_Darwin/Praatscripts/Spectral%20Rotation">http://www.lifesci.sussex.ac.uk/home/Chris_Darwin/Praatscripts/Spectral%20Rotation</a></p>
<blockquote>
<div><dl class="simple">
<dt>Parameters:</dt><dd><p>self.args{‘maximum_frequency’} (float): maximum frequency</p>
</dd>
<dt>Returns:</dt><dd><p>{“voice”: new_sound[0]} (dict[str, Union[parselmouth.Sound, str]]): the rotated sound object (not a wav file, but a praat object), or an error message</p>
</dd>
</dl>
</div></blockquote>
</div></blockquote>
</dd></dl>

</dd></dl>

</section>
<section id="scale-intensity">
<h3>Scale Intensity<a class="headerlink" href="#scale-intensity" title="Permalink to this heading">¶</a></h3>
<p>This scales intensity with Peak or RMS. Use this if you want your sounds to all be at an equivalent amplitude. By default intensity is normalized to 70 dB using RMS. If you use peak, it is scaled between -1 and 1, so pick a number between -1 and 1 to normalize to peak.</p>
<span class="target" id="module-voicelab.src.Voicelab.toolkits.Voicelab.ScaleIntensityNode"></span><dl class="py class">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.ScaleIntensityNode.ScaleIntensityNode">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">voicelab.src.Voicelab.toolkits.Voicelab.ScaleIntensityNode.</span></span><span class="sig-name descname"><span class="pre">ScaleIntensityNode</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.ScaleIntensityNode.ScaleIntensityNode" title="Permalink to this definition">¶</a></dt>
<dd><p>Scale intensity.</p>
<p>Options include RMS or peak method, and a value to scale to</p>
<dl>
<dt>self.args: dict</dt><dd><p>dictionary of values to be passed into the node</p>
<dl class="simple">
<dt>self.args[‘value’]: Union[float, int], default=70.0</dt><dd><p>The value to scale intensity to.  For RMS, this is a positive number between 1 and 90.9691. For Peak (-1, 1), pick a number between -1 and 1.</p>
</dd>
<dt>self.args[‘method’]: str, default=’RMS (dB)’</dt><dd><p>Choose between RMS and peak.</p>
</dd>
</dl>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.ScaleIntensityNode.ScaleIntensityNode.process">
<span class="sig-name descname"><span class="pre">process</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.ScaleIntensityNode.ScaleIntensityNode.process" title="Permalink to this definition">¶</a></dt>
<dd><p>Process the Scale Intensity Node</p>
<dl class="field-list simple">
<dt class="field-odd">Return {“voice”<span class="colon">:</span></dt>
<dd class="field-odd"><p>sound} : Dictionary with the manipulated praat sound object</p>
</dd>
<dt class="field-even">Rtype parselmouth.Sound<span class="colon">:</span></dt>
<dd class="field-even"><p></p></dd>
</dl>
</dd></dl>

</dd></dl>

</section>
<section id="truncate-sounds">
<h3>Truncate Sounds<a class="headerlink" href="#truncate-sounds" title="Permalink to this heading">¶</a></h3>
<p>This trims and/or truncates sounds. You can trim a % of time off the ends of the sound, or voicelab can automatically detect silences at the beginning and end of the sound, and clip those out also.
If you have trouble with trimming silences, try adjusting the silence ratio in the Settings tab.</p>
<span class="target" id="module-voicelab.src.Voicelab.toolkits.Voicelab.ManipulateTruncateSoundsNode"></span><dl class="py class">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.ManipulateTruncateSoundsNode.ManipulateTruncateSoundsNode">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">voicelab.src.Voicelab.toolkits.Voicelab.ManipulateTruncateSoundsNode.</span></span><span class="sig-name descname"><span class="pre">ManipulateTruncateSoundsNode</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.ManipulateTruncateSoundsNode.ManipulateTruncateSoundsNode" title="Permalink to this definition">¶</a></dt>
<dd><p>Manipulate raise pitch and formants</p>
<section id="id21">
<h4>Arguments<a class="headerlink" href="#id21" title="Permalink to this heading">¶</a></h4>
<dl>
<dt>self.args<span class="classifier">dict</span></dt><dd><p>Arguments for the node
self.args[“Trim silences”]: bool, default=True</p>
<blockquote>
<div><p>Trim silences</p>
</div></blockquote>
<dl class="simple">
<dt>self.args[“Silence Ratio”]: int, float, default=10.0</dt><dd><p>Silence ratio is the ratio of how loud a silence should be relative to the rest of the sound</p>
</dd>
<dt>self.args[“Trim sound”]: bool, default=True</dt><dd><p>Trim sound</p>
</dd>
<dt>self.args[“Percent to trim from each end”]: int, float, default=10.0</dt><dd><p>Percent of total sound duration to trim from each end</p>
</dd>
</dl>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.ManipulateTruncateSoundsNode.ManipulateTruncateSoundsNode.get_output_file_name">
<span class="sig-name descname"><span class="pre">get_output_file_name</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">filename</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">str</span></span></span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.ManipulateTruncateSoundsNode.ManipulateTruncateSoundsNode.get_output_file_name" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the output file name</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>filename</strong> (<em>str</em>) – The input file name</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>The output file name</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>str</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.ManipulateTruncateSoundsNode.ManipulateTruncateSoundsNode.process">
<span class="sig-name descname"><span class="pre">process</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.ManipulateTruncateSoundsNode.ManipulateTruncateSoundsNode.process" title="Permalink to this definition">¶</a></dt>
<dd><p>Truncate the sound(s)</p>
<dl class="field-list simple">
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p>Dictionary of manipulated sound</p>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p>dict of [str, parselmouth.Sound]</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.ManipulateTruncateSoundsNode.ManipulateTruncateSoundsNode.trim_silences">
<span class="sig-name descname"><span class="pre">trim_silences</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">filename</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Sound</span></span></span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.ManipulateTruncateSoundsNode.ManipulateTruncateSoundsNode.trim_silences" title="Permalink to this definition">¶</a></dt>
<dd><p>Saves out the loudest 90% of the sound</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>filename</strong> (<em>str</em>) – The input file name</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Trimmed sound object</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>parselmouth.Sound</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.ManipulateTruncateSoundsNode.ManipulateTruncateSoundsNode.trim_sound">
<span class="sig-name descname"><span class="pre">trim_sound</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">filename</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Sound</span></span></span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.ManipulateTruncateSoundsNode.ManipulateTruncateSoundsNode.trim_sound" title="Permalink to this definition">¶</a></dt>
<dd><p>Trim the sound</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>filename</strong> (<em>str</em>) – The input file name</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Trimmed sound object</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>parselmouth.Sound</p>
</dd>
</dl>
</dd></dl>

</section>
</dd></dl>

</section>
</section>
<section id="visualization-nodes">
<h2>Visualization Nodes<a class="headerlink" href="#visualization-nodes" title="Permalink to this heading">¶</a></h2>
<section id="spectrograms">
<h3>Spectrograms<a class="headerlink" href="#spectrograms" title="Permalink to this heading">¶</a></h3>
<a class="reference internal image-reference" href="../spectrogram.png"><img alt="Spectrogram" src="../spectrogram.png" style="width: 400px;" /></a>
<p>VoiceLab creates full colour spectrograms. By default we use a wide-band window. You can adjust the window length. For example, for a narrow-band spectrogram, you can try 0.005 as a window length. You can also select a different colour palate. You can also overlay pitch, the first four formant frequencies, and intensity measures on the spectrogram.</p>
<span class="target" id="module-voicelab.src.Voicelab.toolkits.Voicelab.VisualizeVoiceNode"></span><dl class="py class">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.VisualizeVoiceNode.VisualizeVoiceNode">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">voicelab.src.Voicelab.toolkits.Voicelab.VisualizeVoiceNode.</span></span><span class="sig-name descname"><span class="pre">VisualizeVoiceNode</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.VisualizeVoiceNode.VisualizeVoiceNode" title="Permalink to this definition">¶</a></dt>
<dd><p>Create a spectrogram with optional overlays of Pitch, Amplitude, and Formant Frequencies.</p>
<section id="id22">
<h4>Attributes<a class="headerlink" href="#id22" title="Permalink to this heading">¶</a></h4>
<dl class="simple">
<dt>self.show_figure’: bool, default=True</dt><dd><p>Whether to show the figure</p>
</dd>
<dt>self.args: dict of parameters to be passed into the node</dt><dd><dl class="simple">
<dt>self.args[‘window_length’]: float, default=0.05</dt><dd><p>The window length for the spectrogram analysis</p>
</dd>
<dt>self.args[‘colour_map’]: str, default = ‘afmhot’</dt><dd><p>Which matplotlib colour map to use. Watch out for the British/Canadian spelling.</p>
</dd>
<dt>self.args[“Plot Intensity”]: bool, default=True</dt><dd><p>Whether to plot intensity</p>
</dd>
<dt>self.args [“Plot Formants”]: bool, default=True</dt><dd><p>Whether to plot formants</p>
</dd>
<dt>self.args[“Plot Pitch”]: bool, default=True</dt><dd><p>Whether to plot pitch</p>
</dd>
</dl>
</dd>
<dt>self.fontsize: int, default=16</dt><dd><p>The font size for text in the plot</p>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.VisualizeVoiceNode.VisualizeVoiceNode.plot_formants">
<span class="sig-name descname"><span class="pre">plot_formants</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">axis</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">formants</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.VisualizeVoiceNode.VisualizeVoiceNode.plot_formants" title="Permalink to this definition">¶</a></dt>
<dd><p>Plot formants on the spectrogram</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>axis</strong> (<em>plt.axis</em>) – a matplotlib axis object</p></li>
<li><p><strong>formants</strong> (<em>parselmouth.Intensity</em>) – The parselmouth Intensity object</p></li>
<li><p><strong>voice</strong> – The parselmouth Sound object</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.VisualizeVoiceNode.VisualizeVoiceNode.plot_intensity">
<span class="sig-name descname"><span class="pre">plot_intensity</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">axis</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">intensity</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">pad_distance</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.VisualizeVoiceNode.VisualizeVoiceNode.plot_intensity" title="Permalink to this definition">¶</a></dt>
<dd><p>Plot the intensity on the spectrogram</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>axis</strong> (<em>plt.axis</em>) – a matplotlib axis object</p></li>
<li><p><strong>intensity</strong> (<em>parselmouth.Intensity</em>) – The parselmouth Intensity object</p></li>
</ul>
</dd>
<dt class="field-even">Pad_distance<span class="colon">:</span></dt>
<dd class="field-even"><p>how many pixels to pad the intensity y-axis label</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.VisualizeVoiceNode.VisualizeVoiceNode.plot_pitch">
<span class="sig-name descname"><span class="pre">plot_pitch</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">axis</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">pitch</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">pad_distance</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.VisualizeVoiceNode.VisualizeVoiceNode.plot_pitch" title="Permalink to this definition">¶</a></dt>
<dd><p>Plot pitch on the spectrogram
:argument axis: a matplotlib axis object
:type axis: plt.axis</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>pitch</strong> – The parselmouth Intensity object</p></li>
<li><p><strong>voice</strong> – The parselmouth Sound object</p></li>
</ul>
</dd>
<dt class="field-even">Pad_distance<span class="colon">:</span></dt>
<dd class="field-even"><p>how many pixels to pad the pitch y-axis label, this is automatically adjusted if intensity is also displayed</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.VisualizeVoiceNode.VisualizeVoiceNode.process">
<span class="sig-name descname"><span class="pre">process</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">dict[slice(&lt;class</span> <span class="pre">'str'&gt;,</span> <span class="pre">&lt;class</span> <span class="pre">'matplotlib.figure.Figure'&gt;,</span> <span class="pre">None)]</span></span></span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.VisualizeVoiceNode.VisualizeVoiceNode.process" title="Permalink to this definition">¶</a></dt>
<dd><p>Create the spectrogram plot</p>
<dl class="field-list simple">
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p>dict of the matplotlib figure object</p>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p>dict of str | union[plt.figure, str]</p>
</dd>
</dl>
</dd></dl>

</section>
</dd></dl>

</section>
<section id="power-spectra">
<h3>Power Spectra<a class="headerlink" href="#power-spectra" title="Permalink to this heading">¶</a></h3>
<a class="reference internal image-reference" href="../power_spectrum.png"><img alt="Power spectrum" src="../power_spectrum.png" style="width: 400px;" /></a>
<p>VoiceLab creates power spectra of sounds and overlays an LPC curve over the top.</p>
<span class="target" id="module-voicelab.src.Voicelab.toolkits.Voicelab.VisualizeSpectrumNode"></span><dl class="py class">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.VisualizeSpectrumNode.VisualizeSpectrumNode">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">voicelab.src.Voicelab.toolkits.Voicelab.VisualizeSpectrumNode.</span></span><span class="sig-name descname"><span class="pre">VisualizeSpectrumNode</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.VisualizeSpectrumNode.VisualizeSpectrumNode" title="Permalink to this definition">¶</a></dt>
<dd><p>Create a power spectrum of the sound with or without an LPC curve plotted over it.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>self.args</strong> – dictionary of settings to be passed into the node</p>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="voicelab.src.Voicelab.toolkits.Voicelab.VisualizeSpectrumNode.VisualizeSpectrumNode.process">
<span class="sig-name descname"><span class="pre">process</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#voicelab.src.Voicelab.toolkits.Voicelab.VisualizeSpectrumNode.VisualizeSpectrumNode.process" title="Permalink to this definition">¶</a></dt>
<dd><p>Default process hook ran by the pipeline when this node is ready</p>
</dd></dl>

</dd></dl>

</section>
</section>
</section>


           </div>
           
          </div>
          <footer>

  <hr/>

  <div role="contentinfo">
    <p>
        &#169; Copyright 2023, David R Feinberg.

    </p>
  </div> 

</footer>
        </div>
      </div>

    </section>

  </div>
  

  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
   

</body>
</html>